summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGravatar Andy Wingo2010-12-04 13:15:43 +0100
committerGravatar Andy Wingo2010-12-04 13:15:47 +0100
commitbc53abe0b6fd969906f371735a34a17ef5b6de70 (patch)
tree4f7a10f75d69c3805775f10ca89ca399e47aa5bb
parent83a569885af47706e64066f5cddf1b7a2bf293a9 (diff)
downloadtekuti-bc53abe0b6fd969906f371735a34a17ef5b6de70.tar.gz
tekuti-bc53abe0b6fd969906f371735a34a17ef5b6de70.zip
mod-lisp sets client sockets to iso-8859-1
* tekuti/mod-lisp.scm (read-request/mod-lisp): Set port's encoding to latin-1, so that we reading one char reads one byte.
-rw-r--r--tekuti/mod-lisp.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/tekuti/mod-lisp.scm b/tekuti/mod-lisp.scm
index 458e187..bb35e10 100644
--- a/tekuti/mod-lisp.scm
+++ b/tekuti/mod-lisp.scm
@@ -116,6 +116,9 @@
(lp (acons k v headers) meta)))))))))
(define (read-request/mod-lisp port)
+ ;; See the note in (web request) regarding chars, bytes, and strings
+ ;; for more notes on charsets.
+ (set-port-encoding! port "ISO-8859-1")
(call-with-values (lambda () (read-headers/mod-lisp port))
(lambda (headers meta)
(build-request