summaryrefslogtreecommitdiff
path: root/module/system/vm/assembler.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2017-05-21 11:56:59 +0200
committerAndy Wingo <wingo@pobox.com>2017-05-21 13:42:29 +0200
commit7095a536f32d08efbd6578cb26fc2a4367ad16bb (patch)
tree36efc366f633ccc4256ba56eb87b67ad1a4103d2 /module/system/vm/assembler.scm
parent96c9af4ab1490766fb1e2229ff3cf565cf7f10d1 (diff)
downloadguile-7095a536f32d08efbd6578cb26fc2a4367ad16bb.tar.gz
web: add support for URI-reference
Based on a patch by Daniel Hartwig <mandyke@gmail.com>. * NEWS: Update. * doc/ref/web.texi (URIs): Fragments are properly part of a URI, so remove the incorrect note. Add documentation on URI subtypes. * module/web/uri.scm (uri-reference?): New base type predicate. (uri?, relative-ref?): Specific predicates. (validate-uri-reference): Strict validation. (validate-uri, validate-relative-ref): Specific validators. (build-uri-reference, build-relative-ref): New constructors. (string->uri-reference): Rename from string->uri. (string->uri, string->relative-ref): Specific constructors. (uri->string): Add #:include-fragment? keyword argument. * module/web/http.scm (parse-request-uri): Use `build-uri-reference', and result is a URI-reference, not URI, object. No longer infer an absent `uri-scheme' is `http'. (write-uri): Just use `uri->string'. (declare-uri-header!): Remove unused function. (declare-uri-reference-header!): Update. Rename from `declare-relative-uri-header!'. * test-suite/tests/web-uri.test ("build-uri-reference"): ("string->uri-reference"): Add. ("uri->string"): Also tests for relative-refs. * test-suite/tests/web-http.test ("read-request-line"): ("write-request-line"): Update for no scheme in some URIs. ("entity headers", "request headers"): Content-location, Referer, and Location should also parse relative-URIs. * test-suite/tests/web-request.test ("example-1"): Expect URI-reference with no scheme.
Diffstat (limited to 'module/system/vm/assembler.scm')
0 files changed, 0 insertions, 0 deletions