1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

adjust to apr_uri_ rename

Submitted by:	dougm@apache.org
Reviewed by:	ianh@apache.org


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90402 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ian Holsman
2001-08-20 16:49:29 +00:00
parent bc7292bcb2
commit af3b2ee457
5 changed files with 22 additions and 18 deletions

View File

@@ -1,3 +1,7 @@
mod_proxy changes for httpd 2.0.25-dev
*) apr_uri type/function namespace changes in apr_uri functions
[Doug MacEachern <dougm@covalent.net>]
mod_proxy changes for httpd 2.0.23-dev mod_proxy changes for httpd 2.0.23-dev
*) break the proxy_http_handler into multiple smaller functions. *) break the proxy_http_handler into multiple smaller functions.

View File

@@ -244,15 +244,15 @@ static int proxy_needsdomain(request_rec *r, const char *url, const char *domain
/* Note that the domain name always starts with a dot */ /* Note that the domain name always starts with a dot */
r->parsed_uri.hostname = apr_pstrcat(r->pool, r->parsed_uri.hostname, r->parsed_uri.hostname = apr_pstrcat(r->pool, r->parsed_uri.hostname,
domain, NULL); domain, NULL);
nuri = apr_uri_unparse_components(r->pool, nuri = apr_uri_unparse(r->pool,
&r->parsed_uri, &r->parsed_uri,
UNP_REVEALPASSWORD); APR_URI_UNP_REVEALPASSWORD);
apr_table_set(r->headers_out, "Location", nuri); apr_table_set(r->headers_out, "Location", nuri);
ap_log_rerror(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r, ap_log_rerror(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r,
"Domain missing: %s sent to %s%s%s", r->uri, "Domain missing: %s sent to %s%s%s", r->uri,
apr_uri_unparse_components(r->pool, &r->parsed_uri, apr_uri_unparse(r->pool, &r->parsed_uri,
UNP_OMITUSERINFO), APR_URI_UNP_OMITUSERINFO),
ref ? " from " : "", ref ? ref : ""); ref ? " from " : "", ref ? ref : "");
return HTTP_MOVED_PERMANENTLY; return HTTP_MOVED_PERMANENTLY;

View File

@@ -134,7 +134,7 @@ int ap_proxy_connect_handler(request_rec *r, proxy_server_conf *conf,
apr_int16_t pollevent; apr_int16_t pollevent;
apr_sockaddr_t *uri_addr, *connect_addr; apr_sockaddr_t *uri_addr, *connect_addr;
apr_uri_components uri; apr_uri_t uri;
const char *connectname; const char *connectname;
int connectport = 0; int connectport = 0;
@@ -155,7 +155,7 @@ int ap_proxy_connect_handler(request_rec *r, proxy_server_conf *conf,
*/ */
/* we break the URL into host, port, uri */ /* we break the URL into host, port, uri */
if (APR_SUCCESS != apr_uri_parse_hostinfo_components(p, url, &uri)) { if (APR_SUCCESS != apr_uri_parse_hostinfo(p, url, &uri)) {
return ap_proxyerror(r, HTTP_BAD_REQUEST, return ap_proxyerror(r, HTTP_BAD_REQUEST,
apr_pstrcat(p, "URI cannot be parsed: ", url, NULL)); apr_pstrcat(p, "URI cannot be parsed: ", url, NULL));
} }
@@ -190,8 +190,8 @@ int ap_proxy_connect_handler(request_rec *r, proxy_server_conf *conf,
if (conf->allowed_connect_ports->nelts == 0) { if (conf->allowed_connect_ports->nelts == 0) {
/* Default setting if not overridden by AllowCONNECT */ /* Default setting if not overridden by AllowCONNECT */
switch (uri.port) { switch (uri.port) {
case APU_URI_HTTPS_DEFAULT_PORT: case APR_URI_HTTPS_DEFAULT_PORT:
case APU_URI_SNEWS_DEFAULT_PORT: case APR_URI_SNEWS_DEFAULT_PORT:
break; break;
default: default:
return HTTP_FORBIDDEN; return HTTP_FORBIDDEN;

View File

@@ -289,9 +289,9 @@ apr_status_t ap_proxy_send_dir_filter(ap_filter_t *f, apr_bucket_brigade *in)
if (HEADER == ctx->state) { if (HEADER == ctx->state) {
/* Save "scheme://site" prefix without password */ /* Save "scheme://site" prefix without password */
site = apr_uri_unparse_components(p, &f->r->parsed_uri, UNP_OMITPASSWORD|UNP_OMITPATHINFO); site = apr_uri_unparse(p, &f->r->parsed_uri, APR_URI_UNP_OMITPASSWORD|APR_URI_UNP_OMITPATHINFO);
/* ... and path without query args */ /* ... and path without query args */
path = apr_uri_unparse_components(p, &f->r->parsed_uri, UNP_OMITSITEPART|UNP_OMITQUERY); path = apr_uri_unparse(p, &f->r->parsed_uri, APR_URI_UNP_OMITSITEPART|APR_URI_UNP_OMITQUERY);
(void)decodeenc(path); (void)decodeenc(path);
/* Copy path, strip (all except the last) trailing slashes */ /* Copy path, strip (all except the last) trailing slashes */
@@ -510,13 +510,13 @@ static int ftp_unauthorized (request_rec *r, int log_it)
if (log_it) if (log_it)
ap_log_rerror(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r, ap_log_rerror(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r,
"proxy: missing or failed auth to %s", "proxy: missing or failed auth to %s",
apr_uri_unparse_components(r->pool, apr_uri_unparse(r->pool,
&r->parsed_uri, UNP_OMITPATHINFO)); &r->parsed_uri, APR_URI_UNP_OMITPATHINFO));
apr_table_setn(r->err_headers_out, "WWW-Authenticate", apr_table_setn(r->err_headers_out, "WWW-Authenticate",
apr_pstrcat(r->pool, "Basic realm=\"", apr_pstrcat(r->pool, "Basic realm=\"",
apr_uri_unparse_components(r->pool, &r->parsed_uri, apr_uri_unparse(r->pool, &r->parsed_uri,
UNP_OMITPASSWORD|UNP_OMITPATHINFO), APR_URI_UNP_OMITPASSWORD|APR_URI_UNP_OMITPATHINFO),
"\"", NULL)); "\"", NULL));
return HTTP_UNAUTHORIZED; return HTTP_UNAUTHORIZED;

View File

@@ -190,7 +190,7 @@ apr_status_t ap_proxy_http_determine_connection(apr_pool_t *p, request_rec *r,
proxy_http_conn_t *p_conn, proxy_http_conn_t *p_conn,
conn_rec *c, conn_rec *c,
proxy_server_conf *conf, proxy_server_conf *conf,
apr_uri_components *uri, apr_uri_t *uri,
char **url, char **url,
const char *proxyname, const char *proxyname,
apr_port_t proxyport, apr_port_t proxyport,
@@ -203,7 +203,7 @@ apr_status_t ap_proxy_http_determine_connection(apr_pool_t *p, request_rec *r,
*/ */
/* we break the URL into host, port, uri */ /* we break the URL into host, port, uri */
if (APR_SUCCESS != apr_uri_parse_components(p, *url, uri)) { if (APR_SUCCESS != apr_uri_parse(p, *url, uri)) {
return ap_proxyerror(r, HTTP_BAD_REQUEST, return ap_proxyerror(r, HTTP_BAD_REQUEST,
apr_pstrcat(p,"URI cannot be parsed: ", *url, apr_pstrcat(p,"URI cannot be parsed: ", *url,
NULL)); NULL));
@@ -441,7 +441,7 @@ static
apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r, apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
proxy_http_conn_t *p_conn, conn_rec *origin, proxy_http_conn_t *p_conn, conn_rec *origin,
proxy_server_conf *conf, proxy_server_conf *conf,
apr_uri_components *uri, apr_uri_t *uri,
char *url, apr_bucket_brigade *bb, char *url, apr_bucket_brigade *bb,
char *server_portstr) { char *server_portstr) {
char buffer[HUGE_STRING_LEN]; char buffer[HUGE_STRING_LEN];
@@ -904,7 +904,7 @@ int ap_proxy_http_handler(request_rec *r, proxy_server_conf *conf,
apr_pool_t *p = r->connection->pool; apr_pool_t *p = r->connection->pool;
conn_rec *c = r->connection; conn_rec *c = r->connection;
apr_bucket_brigade *bb = apr_brigade_create(p); apr_bucket_brigade *bb = apr_brigade_create(p);
apr_uri_components *uri = apr_palloc(r->connection->pool, sizeof(*uri)); apr_uri_t *uri = apr_palloc(r->connection->pool, sizeof(*uri));
proxy_http_conn_t *p_conn = apr_pcalloc(r->connection->pool, proxy_http_conn_t *p_conn = apr_pcalloc(r->connection->pool,
sizeof(*p_conn)); sizeof(*p_conn));