You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Doug MacEachern <do...@covalent.net> on 2001/08/19 20:19:15 UTC

proxy patch for apr uri changes

i don't have karma for httpd-proxy, i tried mailing
proxy-dev@httpd.apache.org but that list does not exist.  i can't find
mention of what the right list is in the httpd-proxy/README or elsewhere.

Index: mod_proxy.c
===================================================================
RCS file: /home/cvs/httpd-proxy/module-2.0/mod_proxy.c,v
retrieving revision 1.51
diff -u -r1.51 mod_proxy.c
--- mod_proxy.c	2001/08/15 21:45:51	1.51
+++ mod_proxy.c	2001/08/19 16:05:48
@@ -244,15 +244,15 @@
     /* Note that the domain name always starts with a dot */
     r->parsed_uri.hostname = apr_pstrcat(r->pool, r->parsed_uri.hostname,
 				     domain, NULL);
-    nuri = apr_uri_unparse_components(r->pool,
+    nuri = apr_uri_unparse(r->pool,
 				  &r->parsed_uri,
-				  UNP_REVEALPASSWORD);
+				  APR_URI_UNP_REVEALPASSWORD);
 
     apr_table_set(r->headers_out, "Location", nuri);
     ap_log_rerror(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r,
 		"Domain missing: %s sent to %s%s%s", r->uri,
-		apr_uri_unparse_components(r->pool, &r->parsed_uri,
-		      UNP_OMITUSERINFO),
+		apr_uri_unparse(r->pool, &r->parsed_uri,
+		      APR_URI_UNP_OMITUSERINFO),
 		ref ? " from " : "", ref ? ref : "");
 
     return HTTP_MOVED_PERMANENTLY;
Index: proxy_connect.c
===================================================================
RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_connect.c,v
retrieving revision 1.49
diff -u -r1.49 proxy_connect.c
--- proxy_connect.c	2001/08/03 18:00:38	1.49
+++ proxy_connect.c	2001/08/19 16:05:49
@@ -134,7 +134,7 @@
     apr_int16_t pollevent;
     apr_sockaddr_t *uri_addr, *connect_addr;
 
-    apr_uri_components uri;
+    apr_uri_t uri;
     const char *connectname;
     int connectport = 0;
 
@@ -155,7 +155,7 @@
      */
 
     /* 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,
 			     apr_pstrcat(p, "URI cannot be parsed: ", url, NULL));
     }
@@ -190,8 +190,8 @@
     if (conf->allowed_connect_ports->nelts == 0) {
 	/* Default setting if not overridden by AllowCONNECT */
 	switch (uri.port) {
-	    case APU_URI_HTTPS_DEFAULT_PORT:
-	    case APU_URI_SNEWS_DEFAULT_PORT:
+	    case APR_URI_HTTPS_DEFAULT_PORT:
+	    case APR_URI_SNEWS_DEFAULT_PORT:
 		break;
 	    default:
 		return HTTP_FORBIDDEN;
Index: proxy_ftp.c
===================================================================
RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_ftp.c,v
retrieving revision 1.78
diff -u -r1.78 proxy_ftp.c
--- proxy_ftp.c	2001/08/07 21:46:47	1.78
+++ proxy_ftp.c	2001/08/19 16:05:54
@@ -289,9 +289,9 @@
     if (HEADER == ctx->state) {
 
 	/* 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 */
-	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);
 
 	/* Copy path, strip (all except the last) trailing slashes */
@@ -510,13 +510,13 @@
     if (log_it)
 	ap_log_rerror(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r,
 		      "proxy: missing or failed auth to %s",
-		      apr_uri_unparse_components(r->pool,
-		      &r->parsed_uri, UNP_OMITPATHINFO));
+		      apr_uri_unparse(r->pool,
+		      &r->parsed_uri, APR_URI_UNP_OMITPATHINFO));
 
     apr_table_setn(r->err_headers_out, "WWW-Authenticate",
                   apr_pstrcat(r->pool, "Basic realm=\"",
-		  apr_uri_unparse_components(r->pool, &r->parsed_uri,
-		    UNP_OMITPASSWORD|UNP_OMITPATHINFO),
+		  apr_uri_unparse(r->pool, &r->parsed_uri,
+		    APR_URI_UNP_OMITPASSWORD|APR_URI_UNP_OMITPATHINFO),
 		    "\"", NULL));
 
     return HTTP_UNAUTHORIZED;
Index: proxy_http.c
===================================================================
RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_http.c,v
retrieving revision 1.91
diff -u -r1.91 proxy_http.c
--- proxy_http.c	2001/08/17 17:12:18	1.91
+++ proxy_http.c	2001/08/19 16:05:56
@@ -190,7 +190,7 @@
                                                 proxy_http_conn_t *p_conn,
                                                 conn_rec *c,
                                                 proxy_server_conf *conf,
-                                                apr_uri_components *uri,
+                                                apr_uri_t *uri,
                                                 char **url,
                                                 const char *proxyname,
                                                 apr_port_t proxyport,
@@ -203,7 +203,7 @@
      */
 
     /* 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,
                              apr_pstrcat(p,"URI cannot be parsed: ", *url,
                                          NULL));
@@ -441,7 +441,7 @@
 apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
                                    proxy_http_conn_t *p_conn, conn_rec *origin, 
                                    proxy_server_conf *conf,
-                                   apr_uri_components *uri,
+                                   apr_uri_t *uri,
                                    char *url, apr_bucket_brigade *bb,
                                    char *server_portstr) {
     char buffer[HUGE_STRING_LEN];
@@ -904,7 +904,7 @@
     apr_pool_t *p = r->connection->pool;
     conn_rec *c = r->connection;
     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,
                                            sizeof(*p_conn));
 


Re: proxy patch for apr uri changes

Posted by Ian Holsman <ia...@cnet.com>.
Victor J. Orlikowski wrote:

>Erp.
>Nope. Karma on proxy is different from karma on httpd.
>Procedural question: If I have commit on proxy, can I give someone the
>needed karma?
>If no, then we have to wait on Chuck to get back in town (Ian or I
>could commit it, but are there any tagging issues, Ian?)
>
>Victor (rushing back to packing ... moving ... ;p )
>
I've just tagged a 2_0_24 of mod-proxy (and got it to compile it again 
on windows)
My daughter is calling me.. so I'll have to do the patch later tonight.
(or you can do it now)




Re: proxy patch for apr uri changes

Posted by Ryan Bloom <rb...@covalent.net>.
On Sunday 19 August 2001 13:23, Victor J. Orlikowski wrote:
> Erp.
> Nope. Karma on proxy is different from karma on httpd.
> Procedural question: If I have commit on proxy, can I give someone the
> needed karma?

No, but there are a few people on new-httpd who can, myself included.
What we should do, is the same thing we did for APR, anybody who has
commit access to httpd, should get commit access to the proxy as soon as
they ask for it.

Ryan 

> If no, then we have to wait on Chuck to get back in town (Ian or I
> could commit it, but are there any tagging issues, Ian?)
>
> Victor (rushing back to packing ... moving ... ;p )

-- 

______________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: proxy patch for apr uri changes

Posted by Ian Holsman <ia...@cnet.com>.
Victor J. Orlikowski wrote:

>Erp.
>Nope. Karma on proxy is different from karma on httpd.
>Procedural question: If I have commit on proxy, can I give someone the
>needed karma?
>If no, then we have to wait on Chuck to get back in town (Ian or I
>could commit it, but are there any tagging issues, Ian?)
>
>Victor (rushing back to packing ... moving ... ;p )
>
I've just tagged a 2_0_24 of mod-proxy (and got it to compile it again 
on windows)
My daughter is calling me.. so I'll have to do the patch later tonight.
(or you can do it now)




Re: proxy patch for apr uri changes

Posted by "Victor J. Orlikowski" <v....@gte.net>.
Erp.
Nope. Karma on proxy is different from karma on httpd.
Procedural question: If I have commit on proxy, can I give someone the
needed karma?
If no, then we have to wait on Chuck to get back in town (Ian or I
could commit it, but are there any tagging issues, Ian?)

Victor (rushing back to packing ... moving ... ;p )
-- 
Victor J. Orlikowski   | The Wall is Down, But the Threat Remains!
==================================================================
v.j.orlikowski@gte.net | orlikowski@apache.org | vjo@us.ibm.com

Re: proxy patch for apr uri changes

Posted by Doug MacEachern <do...@covalent.net>.
On Sun, 19 Aug 2001, Ian Holsman wrote:

> 1 tic.
> mod-proxy hasn't tagged itself yet
> I'll add the mailing list modproxy-dev@apache.org to the readme.
>
> (proxy has the same karma as httpd BTW so you should be able to commit 
> as you have access
> to httpd)

something doesn't like me:
**** Access denied: Insufficient Karma (dougm|httpd-proxy/module-2.0)
cvs server: Pre-commit check failed
cvs [server aborted]: correct above errors first!



Re: proxy patch for apr uri changes

Posted by Ian Holsman <ia...@cnet.com>.
1 tic.
mod-proxy hasn't tagged itself yet
I'll add the mailing list modproxy-dev@apache.org to the readme.
(proxy has the same karma as httpd BTW so you should be able to commit 
as you have access
to httpd)

..Ian
Doug MacEachern wrote:

>i don't have karma for httpd-proxy, i tried mailing
>proxy-dev@httpd.apache.org but that list does not exist.  i can't find
>mention of what the right list is in the httpd-proxy/README or elsewhere.
>
>Index: mod_proxy.c
>===================================================================
>RCS file: /home/cvs/httpd-proxy/module-2.0/mod_proxy.c,v
>retrieving revision 1.51
>diff -u -r1.51 mod_proxy.c
>--- mod_proxy.c	2001/08/15 21:45:51	1.51
>+++ mod_proxy.c	2001/08/19 16:05:48
>@@ -244,15 +244,15 @@
>     /* Note that the domain name always starts with a dot */
>     r->parsed_uri.hostname = apr_pstrcat(r->pool, r->parsed_uri.hostname,
> 				     domain, NULL);
>-    nuri = apr_uri_unparse_components(r->pool,
>+    nuri = apr_uri_unparse(r->pool,
> 				  &r->parsed_uri,
>-				  UNP_REVEALPASSWORD);
>+				  APR_URI_UNP_REVEALPASSWORD);
> 
>     apr_table_set(r->headers_out, "Location", nuri);
>     ap_log_rerror(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r,
> 		"Domain missing: %s sent to %s%s%s", r->uri,
>-		apr_uri_unparse_components(r->pool, &r->parsed_uri,
>-		      UNP_OMITUSERINFO),
>+		apr_uri_unparse(r->pool, &r->parsed_uri,
>+		      APR_URI_UNP_OMITUSERINFO),
> 		ref ? " from " : "", ref ? ref : "");
> 
>     return HTTP_MOVED_PERMANENTLY;
>Index: proxy_connect.c
>===================================================================
>RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_connect.c,v
>retrieving revision 1.49
>diff -u -r1.49 proxy_connect.c
>--- proxy_connect.c	2001/08/03 18:00:38	1.49
>+++ proxy_connect.c	2001/08/19 16:05:49
>@@ -134,7 +134,7 @@
>     apr_int16_t pollevent;
>     apr_sockaddr_t *uri_addr, *connect_addr;
> 
>-    apr_uri_components uri;
>+    apr_uri_t uri;
>     const char *connectname;
>     int connectport = 0;
> 
>@@ -155,7 +155,7 @@
>      */
> 
>     /* 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,
> 			     apr_pstrcat(p, "URI cannot be parsed: ", url, NULL));
>     }
>@@ -190,8 +190,8 @@
>     if (conf->allowed_connect_ports->nelts == 0) {
> 	/* Default setting if not overridden by AllowCONNECT */
> 	switch (uri.port) {
>-	    case APU_URI_HTTPS_DEFAULT_PORT:
>-	    case APU_URI_SNEWS_DEFAULT_PORT:
>+	    case APR_URI_HTTPS_DEFAULT_PORT:
>+	    case APR_URI_SNEWS_DEFAULT_PORT:
> 		break;
> 	    default:
> 		return HTTP_FORBIDDEN;
>Index: proxy_ftp.c
>===================================================================
>RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_ftp.c,v
>retrieving revision 1.78
>diff -u -r1.78 proxy_ftp.c
>--- proxy_ftp.c	2001/08/07 21:46:47	1.78
>+++ proxy_ftp.c	2001/08/19 16:05:54
>@@ -289,9 +289,9 @@
>     if (HEADER == ctx->state) {
> 
> 	/* 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 */
>-	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);
> 
> 	/* Copy path, strip (all except the last) trailing slashes */
>@@ -510,13 +510,13 @@
>     if (log_it)
> 	ap_log_rerror(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r,
> 		      "proxy: missing or failed auth to %s",
>-		      apr_uri_unparse_components(r->pool,
>-		      &r->parsed_uri, UNP_OMITPATHINFO));
>+		      apr_uri_unparse(r->pool,
>+		      &r->parsed_uri, APR_URI_UNP_OMITPATHINFO));
> 
>     apr_table_setn(r->err_headers_out, "WWW-Authenticate",
>                   apr_pstrcat(r->pool, "Basic realm=\"",
>-		  apr_uri_unparse_components(r->pool, &r->parsed_uri,
>-		    UNP_OMITPASSWORD|UNP_OMITPATHINFO),
>+		  apr_uri_unparse(r->pool, &r->parsed_uri,
>+		    APR_URI_UNP_OMITPASSWORD|APR_URI_UNP_OMITPATHINFO),
> 		    "\"", NULL));
> 
>     return HTTP_UNAUTHORIZED;
>Index: proxy_http.c
>===================================================================
>RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_http.c,v
>retrieving revision 1.91
>diff -u -r1.91 proxy_http.c
>--- proxy_http.c	2001/08/17 17:12:18	1.91
>+++ proxy_http.c	2001/08/19 16:05:56
>@@ -190,7 +190,7 @@
>                                                 proxy_http_conn_t *p_conn,
>                                                 conn_rec *c,
>                                                 proxy_server_conf *conf,
>-                                                apr_uri_components *uri,
>+                                                apr_uri_t *uri,
>                                                 char **url,
>                                                 const char *proxyname,
>                                                 apr_port_t proxyport,
>@@ -203,7 +203,7 @@
>      */
> 
>     /* 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,
>                              apr_pstrcat(p,"URI cannot be parsed: ", *url,
>                                          NULL));
>@@ -441,7 +441,7 @@
> apr_status_t ap_proxy_http_request(apr_pool_t *p, request_rec *r,
>                                    proxy_http_conn_t *p_conn, conn_rec *origin, 
>                                    proxy_server_conf *conf,
>-                                   apr_uri_components *uri,
>+                                   apr_uri_t *uri,
>                                    char *url, apr_bucket_brigade *bb,
>                                    char *server_portstr) {
>     char buffer[HUGE_STRING_LEN];
>@@ -904,7 +904,7 @@
>     apr_pool_t *p = r->connection->pool;
>     conn_rec *c = r->connection;
>     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,
>                                            sizeof(*p_conn));
> 
>