Hi Daniel, Thanks for the quick reply and patch!
Daniel Hartwig <mand...@gmail.com> skribis: > On 8 November 2012 04:40, Ludovic Courtès <l...@gnu.org> wrote: >> scheme@(guile-user)> (use-modules (web client) (web uri)) >> scheme@(guile-user)> (http-get (string->uri >> "http://www.gnu.org/does-not-exist")) >> web/http.scm:191:11: In procedure read-header: >> web/http.scm:191:11: Bad uri header component: gnu-404.html > > Some headers are supposed to support these “URI-references”. Oh, OK. > * TODO maybe use more scheme-ish names instead of RFC 3986 > This latest RFC makes a clear distinction between an actual URI > and a reference to such. I thought it best to reflect that > distinction, but maybe it does pollute the namespace a bit: > - absolute-uri? → uri-absolute? > - relative-ref? → uri-relative? No, I’d keep the names on the left. Name space control is best left to ‘use-modules’ forms, anyway. > * TODO build-uri validation is broken/less strict and will now pass > relative-refs, so maybe introduce build-uri-reference instead Yes. Should uri-reference be a disjoint type, then? > -(declare-uri-header! "Content-Location") > +(declare-uri-reference-header! "Content-Location") OK. > ;; Content-MD5 = <base64 of 128 bit MD5 digest as per RFC 1864> > ;; > @@ -1729,7 +1736,7 @@ treated specially, and is just returned as a plain > string." > > ;; Referer = ( absoluteURI | relativeURI ) > ;; > -(declare-uri-header! "Referer") > +(declare-uri-reference-header! "Referer") Should actually be “Referrer”, no? > +(define (absolute-uri? uri) > + (and (uri? uri) (uri-scheme uri) #t)) Eventually, we’ll need docstrings, and updated documentation. Thanks, Ludo’.