[PATCH 0/3] Parse the Link header

2023-10-28 Thread Vivien Kraus
Dear Guile developers, I think Guile should parse the HTTP Link header. I included the patch for resolve-relative-reference that I submitted earlier, because there are otherwise conflicts in AUTHORS and NEWS. What do you think? Best regards, Vivien Vivien Kraus (3): Add resolve-relative-ref

[PATCH 1/3] Add resolve-relative-reference in (web uri), as in RFC 3986 5.2.

2023-10-28 Thread Vivien Kraus
* module/web/uri.scm (remove-dot-segments): Implement algorithm 5.2.4. (merge-paths): Implement algorithm 5.2.3. (resolve-relative-reference): Implement algorithm 5.2.2. (module): Export resolve-relative-reference. * NEWS: Reference it here. * doc/ref/web.texi (URIs): Document it here. (Subtypes of

[PATCH 2/3] Update section comment in (web http).

2023-10-28 Thread Vivien Kraus
The “REPonse headers“ section should be named “RESPonse headers“ (emphasis mine). * module/web/http.scm: Update comment. --- module/web/http.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/web/http.scm b/module/web/http.scm index 24a4312b5..b34159aab 100644 --- a/mo

[PATCH 3/3] Parse the HTTP Link header.

2023-10-28 Thread Vivien Kraus
The Link header [1] is used to add arbitrary metadata to resources. [1]: https://httpwg.org/specs/rfc8288.html#header * module/web/http.scm (parse-link-value): New function. (parse-link-list): New function. (validate-link-list): New function. (write-link-list): New function. (declare-link-list-he

[PATCH v2 4/4] Parse the HTTP Link header.

2023-10-28 Thread Vivien Kraus
The Link header [1] is used to add arbitrary metadata to resources. [1]: https://httpwg.org/specs/rfc8288.html#header * module/web/http.scm (parse-link-value): New function. (parse-link-list): New function. (validate-link-list): New function. (write-link-list): New function. (declare-link-list-he

[PATCH v2 1/4] Add resolve-relative-reference in (web uri), as in RFC 3986 5.2.

2023-10-28 Thread Vivien Kraus
* module/web/uri.scm (remove-dot-segments): Implement algorithm 5.2.4. (merge-paths): Implement algorithm 5.2.3. (resolve-relative-reference): Implement algorithm 5.2.2. (module): Export resolve-relative-reference. * NEWS: Reference it here. * doc/ref/web.texi (URIs): Document it here. (Subtypes of

[PATCH v2 2/4] Update section comment in (web http).

2023-10-28 Thread Vivien Kraus
The “REPonse headers“ section should be named “RESPonse headers“ (emphasis mine). * module/web/http.scm: Update comment. --- module/web/http.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/web/http.scm b/module/web/http.scm index 24a4312b5..b34159aab 100644 --- a/mo

[PATCH v2 3/4] Check that key/value parameters in HTTP headers are quoted in needed.

2023-10-28 Thread Vivien Kraus
If the value has a space, it should be quoted. In headers with a simple list of strings, the parser would not stop for space, but “key=value and value;” parameters must be quoted, otherwise the parser will expect “and” to be a new token. * test-suite/tests/web-http.test ("general headers"): Test i

[PATCH v2 0/4] Add the HTTP Link header (fixed)

2023-10-28 Thread Vivien Kraus
Sorry for the noise. This is the correct version. Best regards, Vivien Vivien Kraus (4): Add resolve-relative-reference in (web uri), as in RFC 3986 5.2. Update section comment in (web http). Check that key/value parameters in HTTP headers are quoted in needed. Parse the HTTP Link heade