guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] Location header is a URI-reference


From: Ludovic Courtès
Subject: Re: [patch] Location header is a URI-reference
Date: Fri, 30 Oct 2015 16:00:19 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Ping!

address@hidden (Ludovic Courtès) skribis:

> Andy Wingo <address@hidden> skribis:
>
>> Following RFC 7231, the HTTP Location: header is a URI-reference, not a
>> URI.  This patch updates Guile's web modules appropriately, fixes a case
>> in which URI fragments were parsed incorrectly, and makes public
>> interfaces for creating URI references.
>>
>> Thoughts?  This is also in wip-uri-reference.
>
> Looks good!
>
> I think this addresses <http://bugs.gnu.org/12827>, right?
>
>> commit 81f61a615ff8c5c5d6e270c255c15eb164f3456c
>> Author: Andy Wingo <address@hidden>
>> Date:   Wed Oct 15 11:49:41 2014 +0200
>>
>>     web: Location header is URI-reference; better URI-reference support
>>     
>>     * module/web/uri.scm (validate-uri): Add reference? keyword argument,
>>       for validating references.
>>       (build-uri): Clarify comments to indicate that the result is an
>>       absolute URI.
>>       (build-uri-reference): New interface, to build URI-references.
>>       (string->uri-reference): Rename from string->uri*.  Fix fragment
>>       parsing to not include the #.
>>       (string->uri): Adapt to string->uri-reference name change.
>>     
>>     * module/web/request.scm (request-absolute-uri): Add default-scheme
>>       optional argument.  Use it if the request-uri has no scheme, or
>>       error.
>>     
>>     * module/web/http.scm (write-uri): Reflow to use "when".  Fix writing of
>>       URI-reference instances.
>>       (declare-uri-reference-header!): Rename from
>>       declare-relative-uri-header!.  Use string->uri-reference.
>>       ("Location"): Declare as a URI-reference header, as per RFC 7231.
>>     
>>     * module/web/client.scm (open-socket-for-uri): Handle the case in which
>>       there is no URI scheme.
>>     
>>     * test-suite/tests/web-http.test:
>>     * test-suite/tests/web-uri.test: Add tests.
>
> Here the URI type is reused for URI references, which I think is good,
> but could it introduce incompatibilities?  Like code that has expected
> “normal” URI objects suddenly gets objects that are really URI
> references.  (Just thinking out loud.)
>
> Thanks for working on it!
>
> Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]