bug#51133: [PATCH 1/1] Tolerate http response line without reason phrase

2021-10-12 Thread Bug reports for GUILE, GNU's Ubiquitous Extension Language
jaku...@riseup.net writes: > You're right but you didn't address my second point. > The fact that with this patch > > (call-with-input-string "HTTP/1.1 \n" > (lambda (port) (read-response-line port))) I see, my bad, thanks! Please find a newly attached patch. I added a test for such a case,

bug#51133: [PATCH 1/1] Tolerate http response line without reason phrase

2021-10-12 Thread jakub-w
You're right but you didn't address my second point. The fact that with this patch (call-with-input-string "HTTP/1.1 \n" (lambda (port) (read-response-line port))) passes the check for 'bad-response error inside read-response-line. It throws 'bad-header-component from non-negative-integer

bug#51133: [PATCH 1/1] Tolerate http response line without reason phrase

2021-10-12 Thread tomas
On Tue, Oct 12, 2021 at 10:26:22AM +0200, Alexey Abramov via Bug reports for GUILE, GNU's Ubiquitous Extension Language wrote: > Hi, > > I agree that it is not a complient http response, According to The Book [1] ;-) there should be at least one space (SP) (as far as I understand this is really

bug#51133: [PATCH 1/1] Tolerate http response line without reason phrase

2021-10-12 Thread Bug reports for GUILE, GNU's Ubiquitous Extension Language
Hi, I agree that it is not a complient http response, but unfortunately I came across with some http services (redfish, cimc from Cisco ), where they don't put a reason phrase. As you can see the difference is that response line doesn't have a space after the response code, that is why it raise

bug#51133: [PATCH 1/1] Tolerate http response line without reason phrase

2021-10-12 Thread jakub-w
I don't think the reason phrase is optional, even though it can be just a whitespace. Even if I'm not mistaken, however, I don't see the reason for Guile not to be able to parse the status line without a space at the end. Aside from that consider a string "HTTP/1.1 ", which should be a bad

bug#51133: [PATCH 1/1] Tolerate http response line without reason phrase

2021-10-11 Thread Bug reports for GUILE, GNU's Ubiquitous Extension Language
* module/web/http.scm (read-response-line): Use the end of the string, in case a line doesn't have char-set:whitespace at the end. * test-suite/tests/web-http.test ("read-response-line"): Add test. --- module/web/http.scm| 6 -- test-suite/tests/web-http.test | 2 ++ 2 files