• Andy Wingo's avatar
    web: add support for URI-reference · 7095a536
    Andy Wingo authored
    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.
    7095a536
Name
Last commit
Last update
..
lalr Loading commit data...
standalone Loading commit data...
test-suite Loading commit data...
tests Loading commit data...
vm Loading commit data...
ChangeLog-2008 Loading commit data...
Makefile.am Loading commit data...
README Loading commit data...
guile-test Loading commit data...