diff options
author | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2006-01-01 17:22:11 +0000 |
---|---|---|
committer | joe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845> | 2006-01-01 17:22:11 +0000 |
commit | 38426abfd24e1d2d321f2387c3e93753757932a6 (patch) | |
tree | b2eb4d1d3bfd0292fa4dca8efbdcdc9106ce7cff /src/ne_uri.h | |
parent | 976e620bf6fcb5e529fb666b14fc15ce999c5d38 (diff) | |
download | neon-38426abfd24e1d2d321f2387c3e93753757932a6.tar.gz |
* src/ne_uri.h (ne_uri_resolve): Add prototype.
* src/ne_uri.c (copy_authority, merge_paths, remove_dot_segments,
ne_uri_resolve): New functions.
* test/uri-tests.c (resolve): Add test cases.
git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@812 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
Diffstat (limited to 'src/ne_uri.h')
-rw-r--r-- | src/ne_uri.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ne_uri.h b/src/ne_uri.h index d152aed..5cf2043 100644 --- a/src/ne_uri.h +++ b/src/ne_uri.h @@ -73,6 +73,14 @@ int ne_uri_parse(const char *uri, ne_uri *parsed); * malloc-allocated, and must be freed by the caller. */ char *ne_uri_unparse(const ne_uri *uri); +/* Resolve a relative URI 'relative', with respect to base URI 'base', + * placing the resultant URI in '*result'. On return, all the 'char + * *' fields of *result are either set to NULL or point to + * malloc-allocated NUL-terminated strings. ne_uri_free can be used + * to free the structure after use. */ +void ne_uri_resolve(const ne_uri *base, const ne_uri *relative, + ne_uri *result); + /* Compares URIs u1 and u2, returns non-zero if they are found to be * non-equal. The sign of the return value is <0 if 'u1' is less than * 'u2', or >0 if 'u2' is greater than 'u1'. */ |