1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-12 06:41:13 +02:00
guile/module/web
Christopher Baines 9a3353a993 web: Handle ending CRLF (\r\n) for chunked input and output ports.
The chunked transfer encoding specifies the chunked body ends with
CRLF. This is in addition to the CRLF at the end of the last chunk, so
there should be CRLF twice at the end of the chunked body:

  https://datatracker.ietf.org/doc/html/rfc2616#section-3.6.1

* module/web/http.scm (make-chunked-input-port): Read two extra bytes at
the end of the chunked input.
(make-chunked-output-port): Write the missing \r\n when closing the
port.
* test-suite/tests/web-http.test (chunked encoding): Add missing \r\n to
test data.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-07-04 11:22:11 +02:00
..
server web: Export 'server-impl' procedures and the 'http' server implementation. 2016-05-22 19:11:32 +02:00
client.scm web: 'tls-wrap' returns an unbuffered custom port. 2021-03-19 14:13:31 +01:00
http.scm web: Handle ending CRLF (\r\n) for chunked input and output ports. 2022-07-04 11:22:11 +02:00
request.scm web: add support for URI-reference 2017-05-21 13:42:29 +02:00
response.scm Web server and client use suspendable ports 2017-02-08 15:16:25 +01:00
server.scm web: Export 'server-impl' procedures and the 'http' server implementation. 2016-05-22 19:11:32 +02:00
uri.scm Add call-with-input-bytevector, call-with-output-bytevector 2021-01-12 12:09:19 +01:00