1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00
Commit graph

5 commits

Author SHA1 Message Date
Andy Wingo
ecfb148137 fix web-request.test
* test-suite/tests/web-request.test ("example-1"): Fix expected format
  of `host' header.
2011-07-18 10:37:46 +02:00
Andy Wingo
037a680321 ensure presence of Host header in HTTP/1.1 requests
* module/web/request.scm (build-request): Make sure that HTTP/1.1
  requests have the Host header set, per RFC 2616 section 9.

* test-suite/tests/web-request.test ("example-1"): Add test.
2011-07-15 13:36:52 +02:00
Andy Wingo
3475fbb572 (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.
2011-01-10 22:44:36 -08:00
Andy Wingo
0acc595b94 (web http): keys are always symbols
* module/web/http.scm (parse-media-type): Parse media types as symbols.
  (parse-key-value-list, parse-param-component, parse-param-list):
  Change kons to val-parser. Always parse keys as symbols, and always
  either cons, if there is a val, or just have the key, if there is no
  val.  Easier to explain and just as correct.
  (declare-param-list-header!, declare-key-value-list-header!): Adapt to
  key-list and param-list kons change.
  ("Cache-Control", "Pragma", "Transfer-Encoding", "Accept", "Expect")
  ("TE"): Likewise, adapt.
  ("Content-Type"): Param keys are symbols.
2011-01-08 20:50:46 -08:00
Andy Wingo
ad05d4e8c6 add HTTP request module
* module/web/request.scm: Add HTTP request module.
* test-suite/tests/web-request.test: Test cases.

* module/Makefile.am:
* test-suite/Makefile.am: Adapt.
2010-11-05 00:31:36 +01:00