/** ST_MODE set to zero if no such file */
apr_finfo_t finfo;
/** components of uri, dismantled */
- apr_uri_components parsed_uri;
+ apr_uri_t parsed_uri;
/* Various other config info which may change with .htaccess files
* These are config vectors, with one void* pointer for each module
apr_time_t nonce_time;
enum hdr_sts auth_hdr_sts;
const char *raw_request_uri;
- apr_uri_components *psd_request_uri;
+ apr_uri_t *psd_request_uri;
int needed_auth;
client_entry *client;
} digest_header_rec;
}
-static void copy_uri_components(apr_uri_components *dst,
- apr_uri_components *src, request_rec *r) {
+static void copy_uri_components(apr_uri_t *dst,
+ apr_uri_t *src, request_rec *r) {
if (src->scheme && src->scheme[0] != '\0')
dst->scheme = src->scheme;
else
/* Hmm, the simple match didn't work (probably a proxy modified the
* request-uri), so lets do a more sophisticated match
*/
- apr_uri_components r_uri, d_uri;
+ apr_uri_t r_uri, d_uri;
copy_uri_components(&r_uri, resp->psd_request_uri, r);
- if (apr_uri_parse_components(r->pool, resp->uri, &d_uri) != APR_SUCCESS) {
+ if (apr_uri_parse(r->pool, resp->uri, &d_uri) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
"Digest: invalid uri <%s> in Authorization header",
resp->uri);
dav_lookup_result result = { 0 };
const char *scheme;
apr_port_t port;
- apr_uri_components comp;
+ apr_uri_t comp;
char *new_file;
const char *domain;
/* first thing to do is parse the URI into various components */
- if (apr_uri_parse_components(r->pool, uri, &comp) != APR_SUCCESS) {
+ if (apr_uri_parse(r->pool, uri, &comp) != APR_SUCCESS) {
result.err.status = HTTP_BAD_REQUEST;
result.err.desc = "Invalid syntax in Destination URI.";
return result;
the current request. Therefore, we can use ap_sub_req_lookup_uri() */
/* reconstruct a URI as just the path */
- new_file = apr_uri_unparse_components(r->pool, &comp, APR_URI_UNP_OMITSITEPART);
+ new_file = apr_uri_unparse(r->pool, &comp, APR_URI_UNP_OMITSITEPART);
/*
* Lookup the URI and return the sub-request. Note that we use the
const char *uri = NULL; /* scope of current production; NULL=no-tag */
size_t uri_len = 0;
dav_if_header *ih = NULL;
- apr_uri_components parsed_uri;
+ apr_uri_t parsed_uri;
const dav_hooks_locks *locks_hooks = DAV_GET_HOOKS_LOCKS(r);
enum {no_tagged, tagged, unknown} list_type = unknown;
int condition;
/* 2518 specifies this must be an absolute URI; just take the
* relative part for later comparison against r->uri */
- if (apr_uri_parse_components(r->pool, uri, &parsed_uri) != APR_SUCCESS) {
+ if (apr_uri_parse(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.");
* (note also that r->the_request contains the unmodified request)
*/
return (r->parsed_uri.password) ? apr_pstrcat(r->pool, r->method, " ",
- apr_uri_unparse_components(r->pool, &r->parsed_uri, 0),
+ apr_uri_unparse(r->pool, &r->parsed_uri, 0),
r->assbackwards ? NULL : " ", r->protocol, NULL)
: r->the_request;
}
found = ap_pregsub(r->pool, p->real, r->uri,
p->regexp->re_nsub + 1, regm);
if (found && doesc) {
- apr_uri_components uri;
- apr_uri_parse_components(r->pool, found, &uri);
+ apr_uri_t uri;
+ apr_uri_parse(r->pool, found, &uri);
found = ap_escape_uri(r->pool, uri.path);
if (uri.query) {
found = apr_pstrcat(r->pool, found, "?", uri.query, NULL);
apr_pool_t *sub;
char *input_uri;
char *strp;
- apr_uri_components result;
+ apr_uri_t result;
unsigned expect;
int status;
unsigned failures;
*strp = 0;
apr_pool_sub_make(&sub, r->pool, NULL);
- status = apr_uri_parse_components(sub, input_uri, &result);
+ status = apr_uri_parse(sub, input_uri, &result);
if (status == APR_SUCCESS) {
#define CHECK(f) \
if ((expect & T_##f) \
r->unparsed_uri = apr_pstrdup(r->pool, uri);
if (r->method_number == M_CONNECT) {
- status = apr_uri_parse_hostinfo_components(r->pool, uri, &r->parsed_uri);
+ status = apr_uri_parse_hostinfo(r->pool, uri, &r->parsed_uri);
}
else {
/* Simple syntax Errors in URLs are trapped by parse_uri_components(). */
- status = apr_uri_parse_components(r->pool, uri, &r->parsed_uri);
+ status = apr_uri_parse(r->pool, uri, &r->parsed_uri);
}
if (status == APR_SUCCESS) {
} else {
/* Don't reveal the password in the server-status view */
apr_cpystrn(ws->request, apr_pstrcat(r->pool, r->method, " ",
- apr_uri_unparse_components(r->pool, &r->parsed_uri, APR_URI_UNP_OMITPASSWORD),
+ apr_uri_unparse(r->pool, &r->parsed_uri, APR_URI_UNP_OMITPASSWORD),
r->assbackwards ? NULL : " ", r->protocol, NULL),
sizeof(ws->request));
}