I've just hacked a couple of patches that fill gaps in Apache's
URI manipulation, sufficient to construct HTTP requests for external
resources. May I submit these for inclusion?
It's mainly an APR patch, but it's also a small httpd patch to fill
a parsed_uri from information in a request_rec
Here are the additional function definitions in the Header files:
1. httpd patch to protocol:
/**
* fill_parsed_uri: fill in fields available in request that parse_uri
* may have left null. Saves making too many special cases when
* using the parsed_uri.
* @param r The current request
* @deffunc void ap_parse_uri(request_rec *r, const char *uri)
*/
AP_CORE_DECLARE(void) ap_fill_parsed_uri(request_rec *r) ;
2. apr-util patch to apr_uri
/**
* 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);
/**
* Parse a given URI, fill in all supplied fields of a apr_uri_t struct.
* 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);
--
Nick Kew