diff options
author | Roy T. Fielding <fielding@apache.org> | 2001-05-22 03:31:12 +0200 |
---|---|---|
committer | Roy T. Fielding <fielding@apache.org> | 2001-05-22 03:31:12 +0200 |
commit | 43b9634ceb1cd0512189fff88b95380ea12064f6 (patch) | |
tree | a71442c47f0a4773f67c651d6cd8e13353d6ea81 /modules/dav/main/util.c | |
parent | Ring in the CHANGES... (diff) | |
download | apache2-43b9634ceb1cd0512189fff88b95380ea12064f6.tar.xz apache2-43b9634ceb1cd0512189fff88b95380ea12064f6.zip |
Moved util_uri to apr-util/uri/apr_uri, which means adding the apr_
prefix to all of the uri functions (yuck), changing some includes,
and using APR error codes instead of HTTP-specific error codes.
Other notes to test this patch:
- You need to delete the util_uri.h file - exports picks up on this.
- I'd like to remove the apr_uri.h from httpd.h, but that might
increase the complexity of this patch even further. Once this patch
is accepted (in some form), then I can focus on removing apr_uri.h
from httpd.h entirely. I need baby steps (heh) right now.
- I imagine that this might break a bunch of stuff in Win32 or other OS
builds with foreign dependency files. Any help here is appreciated.
This is a start... -- justin
Submitted by: Justin Erenkrantz
Reviewed by: Roy Fielding
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89198 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/dav/main/util.c')
-rw-r--r-- | modules/dav/main/util.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/dav/main/util.c b/modules/dav/main/util.c index 5a8d4728e0..059655d8f9 100644 --- a/modules/dav/main/util.c +++ b/modules/dav/main/util.c @@ -189,12 +189,12 @@ dav_lookup_result dav_lookup_uri(const char *uri, request_rec * r, dav_lookup_result result = { 0 }; const char *scheme; apr_port_t port; - uri_components comp; + apr_uri_components comp; char *new_file; const char *domain; /* first thing to do is parse the URI into various components */ - if (ap_parse_uri_components(r->pool, uri, &comp) != HTTP_OK) { + if (apr_uri_parse_components(r->pool, uri, &comp) != APR_SUCCESS) { result.err.status = HTTP_BAD_REQUEST; result.err.desc = "Invalid syntax in Destination URI."; return result; @@ -233,7 +233,7 @@ dav_lookup_result dav_lookup_uri(const char *uri, request_rec * r, /* insert a port if the URI did not contain one */ if (comp.port == 0) - comp.port = ap_default_port_for_scheme(comp.scheme); + comp.port = apr_uri_default_port_for_scheme(comp.scheme); /* now, verify that the URI uses the same scheme as the current. request. the port must match our port. @@ -288,7 +288,7 @@ dav_lookup_result dav_lookup_uri(const char *uri, request_rec * r, the current request. Therefore, we can use ap_sub_req_lookup_uri() */ /* reconstruct a URI as just the path */ - new_file = ap_unparse_uri_components(r->pool, &comp, UNP_OMITSITEPART); + new_file = apr_uri_unparse_components(r->pool, &comp, UNP_OMITSITEPART); /* * Lookup the URI and return the sub-request. Note that we use the @@ -542,7 +542,7 @@ static dav_error * dav_process_if_header(request_rec *r, dav_if_header **p_ih) const char *uri = NULL; /* scope of current production; NULL=no-tag */ size_t uri_len = 0; dav_if_header *ih = NULL; - uri_components parsed_uri; + apr_uri_components parsed_uri; const dav_hooks_locks *locks_hooks = DAV_GET_HOOKS_LOCKS(r); enum {no_tagged, tagged, unknown} list_type = unknown; int condition; @@ -566,7 +566,7 @@ static dav_error * dav_process_if_header(request_rec *r, dav_if_header **p_ih) /* 2518 specifies this must be an absolute URI; just take the * relative part for later comparison against r->uri */ - if (ap_parse_uri_components(r->pool, uri, &parsed_uri) != HTTP_OK) { + if (apr_uri_parse_components(r->pool, uri, &parsed_uri) != APR_SUCCESS) { return dav_new_error(r->pool, HTTP_BAD_REQUEST, DAV_ERR_IF_TAGGED, "Invalid URI in tagged If-header."); |