original commit: e4e8691d91997efc578ca5b35be1f657c004deeb
This commit is contained in:
Matthew Flatt 2003-12-10 20:37:46 +00:00
parent c02f41a8d4
commit fdadebdfc5

View File

@ -403,7 +403,7 @@
;; purify-port : in-port -> header-string
(define purify-port
(lambda (port)
(let ([m (regexp-match-peek-positions #rx"^.*?\r\n\r\n" port)])
(let ([m (regexp-match-peek-positions #rx"^HTTP/.*?((\r\n)|\n)((\r\n)|\n)" port)])
(if m
(read-string (cdar m) port)
""))))