original commit: 6abe66833f9fccedbb7cc676e2867201755899a8
This commit is contained in:
Matthew Flatt 2004-09-06 18:44:55 +00:00
parent f776d29a4d
commit f2ae9e23b7
2 changed files with 4 additions and 7 deletions

View File

@ -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

View File

@ -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 '())]