Re: issues with TriG Test Suite

On 28/12/14 19:43, Ruben Verborgh wrote:
> Hi Gregg,
>
>> Is following redirection a problem for your test harness?
>
> The redirection itself does not pose a problem.
> The problem is it makes the test incorrect—and that's a serious issue.
> Below is the transaction that happens with cURL (truncated for clarity):
>
> $ curl -ivL 'http://www.w3.org/2013/TriGTests/trig-subm-27.trig'
>> GET /2013/TriGTests/trig-subm-27.trig HTTP/1.1
> HTTP/1.1 301 Moved Permanently
> Location: http://www.w3.org/2013/TrigTests/trig-subm-27.trig
>
>> GET /2013/TrigTests/trig-subm-27.trig HTTP/1.1
> HTTP/1.1 200 OK
> Content-Type: application/trig
>
> <
> # In-scope base URI is <http://www.w3.org/2013/TriGTests/trig-subm-27.trig> at this point

RFC 3986: sec 5.1.3:
[[
    Note that
    if the retrieval was the result of a redirected request, the last URI
    used (i.e., the URI that resulted in the actual retrieval of the
    representation) is the base URI.
]]

which makes sense to me because using the old URI, then redirected, or 
new URI directly gets the same base.

	Andy

>
> However, the only correct way to parse this document
> is with <http://www.w3.org/2013/TrigTests/trig-subm-27.trig> as base IRI,
> since this is the URL with which the document has been requested.
>
>> Probably the cleanest is to change the README and .nq result files. I'm concerned that changing this actually invalidates tests
>
> Another option is to change the direction of the redirect,
> so that TrigTests => TriGTests instead of the other way round.
> This should keep compatibility with all existing tests (if they handle redirects),
> while providing the correct parsing of all documents.
>
> Best,
>
> Ruben
>

Received on Sunday, 28 December 2014 20:33:19 UTC