[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 32/50: Modify http header parser to use new read-line "\
From: |
Mike Gran |
Subject: |
[Guile-commits] 32/50: Modify http header parser to use new read-line "\r\n" handling |
Date: |
Mon, 31 Mar 2025 01:04:04 -0400 (EDT) |
mike121 pushed a commit to branch wip-mingw-2025
in repository guile.
commit 993ac2fd74025cfe94dcdadf24d42ae98e4eb9a3
Author: Michael Gran <spk121@yahoo.com>
AuthorDate: Sun Jun 25 08:21:28 2023 -0700
Modify http header parser to use new read-line "\r\n" handling
* module/web/http.scm (read-header-line): modify for new read-line
---
module/web/http.scm | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/module/web/http.scm b/module/web/http.scm
index b65fa91c1..4391c9aaa 100644
--- a/module/web/http.scm
+++ b/module/web/http.scm
@@ -157,13 +157,12 @@ The default writer will call ‘put-string’."
Raise a 'bad-header' exception if the line does not end in CRLF or LF,
or if EOF is reached."
(match (%read-line port)
+ (((? string? line) . "\r\n")
+ line)
(((? string? line) . #\newline)
- ;; '%read-line' does not consider #\return a delimiter; so if it's
- ;; there, remove it. We are more tolerant than the RFC in that we
- ;; tolerate LF-only endings.
- (if (string-suffix? "\r" line)
- (string-drop-right line 1)
- line))
+ ;; We are more tolerant than the RFC in that we tolerate LF-only
+ ;; endings.
+ line)
((line . _) ;EOF or missing delimiter
(bad-header 'read-header-line line))))
- [Guile-commits] 14/50: in filesys test, add helper function for deleting files and symlinks, (continued)
- [Guile-commits] 14/50: in filesys test, add helper function for deleting files and symlinks, Mike Gran, 2025/03/31
- [Guile-commits] 05/50: Make `read-bytes' suspendable for socket reads on MinGW., Mike Gran, 2025/03/31
- [Guile-commits] 15/50: filesys.test: fixes for copy-file test on MinGW, Mike Gran, 2025/03/31
- [Guile-commits] 19/50: Lightening: _WIN32 updates from upstream lightning, Mike Gran, 2025/03/31
- [Guile-commits] 20/50: Win32: don't setjmp to Guile frames, Mike Gran, 2025/03/31
- [Guile-commits] 21/50: allow webserver to run when SIGPIPE not defined, Mike Gran, 2025/03/31
- [Guile-commits] 25/50: MINGW: in ports test, use binary mode for line counter tests, Mike Gran, 2025/03/31
- [Guile-commits] 41/50: Fix scm_to_mpz, Mike Gran, 2025/03/31
- [Guile-commits] 26/50: In web-server test, skip server test if no threads provided, Mike Gran, 2025/03/31
- [Guile-commits] 38/50: explicitly add the gnulib library in LD_ADD, Mike Gran, 2025/03/31
- [Guile-commits] 32/50: Modify http header parser to use new read-line "\r\n" handling,
Mike Gran <=
- [Guile-commits] 48/50: MINGW: fix tmpnam giving filenames in the root directory, Mike Gran, 2025/03/31
- [Guile-commits] 03/50: Add 'set-port-binary/text-mode!' procedure for MinGW., Mike Gran, 2025/03/31
- [Guile-commits] 07/50: Add `scm_sigaction_for_thread' stub for MinGW., Mike Gran, 2025/03/31
- [Guile-commits] 06/50: Install 'mingw_take_signal' on MinGW., Mike Gran, 2025/03/31
- [Guile-commits] 09/50: guix: Add guile-patched, guile-mingw., Mike Gran, 2025/03/31
- [Guile-commits] 10/50: For MinGW, use native signal func in sigaction, Mike Gran, 2025/03/31
- [Guile-commits] 36/50: In posix test, skip AT_SYMLINK_NOFOLLOW test if symlinks unsupported, Mike Gran, 2025/03/31
- [Guile-commits] 40/50: Special case the CPUTF-8 encoding in scm_to_stringn scm_from_stringn, Mike Gran, 2025/03/31
- [Guile-commits] 31/50: Allow read-line to handle "\r\n" as a line terminator, Mike Gran, 2025/03/31
- [Guile-commits] 22/50: libgc's GC_REDIRECT_TO_LOCAL is obsolete., Mike Gran, 2025/03/31