Generic FunctionPackage: net.uriToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version

merge-uris

Arguments: uri base-uri &optional place

Return an absolute URI, based on uri, which can be relative, and base-uri which must be absolute. place can be used as storage for the result.

Note: bad things will happen if you use an interned URI as the result for merging. The result is not interned.

The rules for merging URIs are not the same as for merging pathnames. A simplified version of the merge rules from RFC2396 are (applied in order):

One comment about error checking of URIs as a result of merging: RFC2396 says that an implementation may handle too many ..'s in a merge result "by retaining these components in the resolved path, by removing them from the resolved path, or by avoiding traversal of the reference." The examples in appendix C of RFC2396 imply that an implementation should retain these invalid elements, so that is what we do. For example,

(merge-uris (parse-uri "../../../../g") 
            (parse-uri "http://a/b/c/d;p?q")) 

should return #<uri "http://a/../../g">, which is clearly a nonsense result, but this is what our implementation returns, instead of signaling an error.

See also uri.htm for general information on Universal Resource Indicator support in Allegro CL.


Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.1
Unrevised from 10.0 to 10.1.
10.0 version