Mercurial > core / lisp/lib/obj/uri/pkg.lisp
changeset 698: |
96958d3eb5b0 |
parent: |
78ef6145e272
|
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Fri, 04 Oct 2024 22:04:59 -0400 |
permissions: |
-rw-r--r-- |
description: |
fixes |
1 ;;; obj/uri.lisp --- Univeral Resource Identifiers 3 ;; Where convenient, this is a straight-forward copy of Franz's 4 ;; NET.URI. the source is available here: 5 ;; https://github.com/franzinc/uri/blob/master/uri.cl 7 ;; For general URI information see RFC 3986. 9 ;; For general IRI information see RFC 3987. 11 ;; For general URN information see RFC 8141. 13 ;; For IPv6 changes see RFC 6874. 17 ftp://ftp.is.co.za/rfc/rfc1808.txt 18 https://www.ietf.org/rfc/rfc2396.txt 19 ldap://[2001:db8::7]/c=GB?objectClass?one 20 mailto:John.Doe@example.com 21 news:comp.infosystems.www.servers.unix 23 telnet://192.0.2.16:80/ 24 urn:oasis:names:specification:docbook:dtd:xml:4.1.2 32 ;; (parse-uri-string-rfc3986 "https://test.com") 35 ;; (defmacro do-all-uris ((var &optional uri-space result-form) 38 ;; "do-all-uris (var [[uri-space] result-form]) 39 ;; {declaration}* {tag | statement}* 40 ;; Executes the forms once for each uri with var bound to the current uri" 42 ;; (g-ignore (gensym)) 43 ;; (g-uri-space (gensym)) 44 ;; (body (third (excl::parse-body forms env)))) 45 ;; `(let ((,g-uri-space (or ,uri-space *uris*))) 47 ;; (flet ((,f (,var &optional ,g-ignore) 48 ;; (declare (ignorable ,var ,g-ignore)) 50 ;; (maphash #',f ,g-uri-space)) 51 ;; (return ,result-form))))) 53 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 54 (pushnew :rfc3986 *features*) 55 (pushnew :rfc6874 *features*) 56 (pushnew :rfc8141 *features*) 58 #+ignore ;; debugging only 60 (trace parse-uri-string-rfc3986) 61 #+ignore (trace xsubseq) 67 (trace state-uri-reference) 68 (trace state-absolute-uri) 69 (trace state-hier-part) 70 (trace state-relative-ref) 71 (trace state-relative-part) 73 (trace state-authority) 74 (trace state-userinfo) 77 (trace state-ip-literal) 78 (trace state-ipv6addrz) 80 (trace state-ipvfuture) 81 (trace scan-ipv6address) 82 (trace scan-ipv6address-part4) 83 (trace scan-ipv6address-part5) 84 (trace scan-ipv6address-part6) 85 (trace scan-ipv6address-part7) 86 (trace scan-ipv6address-part8) 87 (trace scan-h16-colon-pairs) 90 (trace state-ipv4address) 91 (trace scan-dec-octet) 92 (trace state-reg-name) 93 (trace state-path-abempty) 94 (trace state-path-absolute) 95 (trace state-path-noscheme) 96 (trace state-path-rootless) 97 (trace state-path-empty) 98 (trace scan-segment-nz-nc) 101 (trace state-fragment) 102 (trace scan-pct-encoded) 104 (trace state-uri-file) 106 (trace state-urn-namestring) 107 (trace state-urn-assigned-name) 108 (trace state-urn-nid) 109 (trace state-urn-nss) 110 (trace state-urn-rq-components) 111 (trace state-urn-r-component) 112 (trace state-urn-q-component)