--- Begin Message ---
Subject: |
[2.0.6] web client: fails to parse 404 header |
Date: |
Wed, 07 Nov 2012 21:40:47 +0100 |
User-agent: |
Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) |
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
Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
scheme@(guile-user) [1]> ,bt
In web/client.scm:
127:4 3 (http-get #<<uri> scheme: http userinfo: #f host: "www.gnu.org"
port: #f path: "/does-not-exist" query: #f fragment: #f> #:port #<input-output:
socket 9> #:version (1 . 1) #:keep-alive? #f #:extra-headers () # #)
In web/response.scm:
188:6 2 (read-response #<input-output: socket 9>)
In web/http.scm:
225:33 1 (lp ((server . "Apache/2.2.14") (date . #<date nanosecond: 0
second: 12 minute: 36 hour: 20 day: 7 month: 11 year: 2012 zone-offset: 0>)))
191:11 0 (read-header #<input-output: socket 9>)
scheme@(guile-user) [1]> ,locals
Local variables:
$5 = port = #<input-output: socket 9>
$6 = line = "Content-Location: gnu-404.html"
$7 = delim = 16
$8 = sym = content-location
Ludo’.
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#12827: [PATCH] Tweak web modules, support relative URIs |
Date: |
Sun, 21 May 2017 14:05:41 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
On Tue 21 Jun 2016 15:22, address@hidden (Ludovic Courtès) writes:
> Andy Wingo <address@hidden> skribis:
>
>> I would like to apply this patch, to master at least. Any objections?
>> We need documentation for the new exports, is the only missing thing.
>
> On a quick glance that looks good. My only concern would be
> incompatibilities; for instance, the ‘content-location’ can now be an
> object that doesn’t pass ‘uri?’, IIUC. Not sure how much of a problem
> that is.
I have applied this patch with some modifications and added docs.
Notably, the behavior of uri? is unchanged relative to master (though
there's a deprecation note; see NEWS) and string->uri keeps its old
behavior of not throwing exceptions. I also removed the "absolute-uri?"
stuff because it was unused and it seems silly to reserve that useful
name in that way -- RFC 3986 defines "absolute uri" simply as being a
URI without a fragment. Weird definition.
Thank you for the patch, Daniel, and thanks to Ludo and Mark for working
through this bug.
Andy
--- End Message ---