better regexp use

svn: r6057

original commit: 3098287803d3b5c2d4a2448ba19cf4061614aec5
This commit is contained in:
Eli Barzilay 2007-04-27 04:22:21 +00:00
parent 76aa4bffb6
commit e69e0e4552

View File

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