mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 21:10:27 +02:00
(web response) and (web request): bodies are bytevectors
* module/web/request.scm (read-request-body, write-request-body): Rename from read-request-body/bytevector and write-request-body/bytevector. Remove the /latin-1 variants, as they were unused and a bad idea. * module/web/response.scm (read-response-body, write-response-body): Likewise. * module/web/server/http.scm (http-read, http-write): Adapt to request/response change. * test-suite/tests/web-request.test: * test-suite/tests/web-response.test: Update tests.
This commit is contained in:
parent
ff8339db69
commit
3475fbb572
5 changed files with 22 additions and 104 deletions
|
@ -51,11 +51,8 @@ Accept-Language: en-gb, en;q=0.9\r
|
|||
|
||||
(pass-if (equal? (request-uri r) (build-uri 'http #:path "/qux")))
|
||||
|
||||
(pass-if (equal? (read-request-body/latin-1 r) #f))
|
||||
;; Since it's #f, should be an idempotent read, so we can try
|
||||
;; bytevectors too
|
||||
(pass-if (equal? (read-request-body/bytevector r) #f))
|
||||
|
||||
(pass-if (equal? (read-request-body r) #f))
|
||||
|
||||
(pass-if "checking all headers"
|
||||
(equal?
|
||||
(request-headers r)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue