From f2ae9e23b777a861b4c220d8f3042fa14efd8a04 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Mon, 6 Sep 2004 18:44:55 +0000 Subject: [PATCH] . original commit: 6abe66833f9fccedbb7cc676e2867201755899a8 --- collects/net/uri-codec-unit.ss | 5 +---- collects/net/url-unit.ss | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/collects/net/uri-codec-unit.ss b/collects/net/uri-codec-unit.ss index f3eab99..8a0dff8 100644 --- a/collects/net/uri-codec-unit.ss +++ b/collects/net/uri-codec-unit.ss @@ -230,10 +230,7 @@ (define form-urlencoded->alist (opt-lambda (str [mode 'both]) (define key-regexp (regexp "[^=]*")) - (define value-regexp (case mode - [(semi) (regexp "[^;]*")] - [(ampm) (regexp "[^&]*")] - [else (regexp "[^&;]*")])) + (define value-regexp (regexp "[^&;]*")) (define (next-key str start) (if (>= start (string-length str)) #f diff --git a/collects/net/url-unit.ss b/collects/net/url-unit.ss index 5a9ac58..d77a715 100644 --- a/collects/net/url-unit.ss +++ b/collects/net/url-unit.ss @@ -132,7 +132,7 @@ (cons (format "Host: ~a" (url-host url)) (if post-data (cons - (format "Content-Length: ~a" (string-length post-data)) + (format "Content-Length: ~a" (bytes-length post-data)) strings) strings))))) (display "\r\n" client->server) @@ -172,7 +172,7 @@ [(url) (get-impure-port url '())] [(url strings) (getpost-impure-port #t url #f strings)])) - ;; post-impure-port : url [x list (str)] -> in-port + ;; post-impure-port : url x bytes [x list (str)] -> in-port (define post-impure-port (case-lambda [(url post-data) (post-impure-port url post-data '())] @@ -203,7 +203,7 @@ [(url) (get-pure-port url '())] [(url strings) (getpost-pure-port #t url #f strings)])) - ;; post-pure-port : url str [x list (str)] -> in-port + ;; post-pure-port : url bytes [x list (str)] -> in-port (define post-pure-port (case-lambda [(url post-data) (post-pure-port url post-data '())]