apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject PR#28453: apr_uri
Date Wed, 28 Dec 2005 11:04:15 GMT
PR#28453 contains a patch to parse URIs relative to a base URI supplied.
Anyone object if I apply it (with any updates necessary - seems to
contain tabs)?

+ * Parse a given URI, fill in all supplied fields of a apr_uri_t structure.
+ * If the given URI is relative, then resolve it using a supplied base
+ * @param p The pool to allocate out of
+ * @param base The base to resolve against
+ * @param uri The uri to parse
+ * @param uptr The apr_uri_t to fill out
+ * @return An HTTP status code
+*/
+APU_DECLARE(int) apr_uri_parse_relative(apr_pool_t *p,
+					const apr_uri_t *base,
+					const char* uri,
+					apr_uri_t* uptr);
+
+/**
+ * Resolve an already-initialised but possibly-relative URL
+ * against a given base URL.
+ * @param p The pool to allocate out of
+ * @param base The base to resolve against
+ * @param uptr The apr_uri_t to resolve
+ * @return An HTTP status code
+ */
+APU_DECLARE(int) apr_uri_resolve_relative(apr_pool_t *p,
+					  const apr_uri_t *base, 
+					  apr_uri_t *uptr);

-- 
Nick Kew

Mime
View raw message