httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From orlikow...@apache.org
Subject cvs commit: httpd-proxy/module-2.0 mod_proxy.c mod_proxy.h mod_proxy.mak proxy_connect.c proxy_ftp.c proxy_http.c
Date Tue, 22 May 2001 19:37:29 GMT
orlikowski    01/05/22 12:37:27

  Modified:    module-2.0 mod_proxy.c mod_proxy.h mod_proxy.mak
                        proxy_connect.c proxy_ftp.c proxy_http.c
  Log:
  Fixes to proxy, after util-uri move, plus fixes to the .mak file.
  
  Revision  Changes    Path
  1.45      +3 -3      httpd-proxy/module-2.0/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-2.0/mod_proxy.c,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- mod_proxy.c	2001/04/15 18:16:22	1.44
  +++ mod_proxy.c	2001/05/22 19:37:02	1.45
  @@ -244,14 +244,14 @@
       /* 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 = ap_unparse_uri_components(r->pool,
  +    nuri = apr_uri_unparse_components(r->pool,
   				  &r->parsed_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,
  -		ap_unparse_uri_components(r->pool, &r->parsed_uri,
  +		ap_uri_unparse_components(r->pool, &r->parsed_uri,
   		      UNP_OMITUSERINFO),
   		ref ? " from " : "", ref ? ref : "");
   
  @@ -478,7 +478,7 @@
       ap_str_tolower(p + 3);		/* lowercase hostname */
   
       if (port == -1) {
  -	port = ap_default_port_for_scheme(scheme);
  +	port = apr_uri_default_port_for_scheme(scheme);
       }
   
       new = apr_array_push(conf->proxies);
  
  
  
  1.52      +1 -1      httpd-proxy/module-2.0/mod_proxy.h
  
  Index: mod_proxy.h
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-2.0/mod_proxy.h,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- mod_proxy.h	2001/05/11 17:32:25	1.51
  +++ mod_proxy.h	2001/05/22 19:37:04	1.52
  @@ -90,6 +90,7 @@
   #include "apr_md5.h"
   #include "apr_pools.h"
   #include "apr_strings.h"
  +#include "apr_uri.h"
   
   #include "httpd.h"
   #include "http_config.h"
  @@ -103,7 +104,6 @@
   #include "http_connection.h"
   #include "util_filter.h"
   #include "util_date.h"
  -#include "util_uri.h"
   #include "mod_core.h"
   
   
  
  
  
  1.2       +20 -20    httpd-proxy/module-2.0/mod_proxy.mak
  
  Index: mod_proxy.mak
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-2.0/mod_proxy.mak,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mod_proxy.mak	2000/12/21 01:46:19	1.1
  +++ mod_proxy.mak	2001/05/22 19:37:06	1.2
  @@ -257,11 +257,11 @@
   	"..\..\include\util_cfgtree.h"\
   	"..\..\include\util_date.h"\
   	"..\..\include\util_filter.h"\
  -	"..\..\include\util_uri.h"\
   	"..\..\os\win32\os.h"\
  -	"..\..\srclib\apr-util\include\ap_buckets.h"\
  -	"..\..\srclib\apr-util\include\ap_hooks.h"\
  -	"..\..\srclib\apr-util\include\ap_ring.h"\
  +	"..\..\srclib\apr-util\include\apr_buckets.h"\
  +	"..\..\srclib\apr-util\include\apr_hooks.h"\
  +	"..\..\srclib\apr-util\include\apr_ring.h"\
  +	"..\..\srclib\apr-util\include\apr_uri.h"\
   	"..\..\srclib\apr\include\apr.h"\
   	"..\..\srclib\apr\include\apr_compat.h"\
   	"..\..\srclib\apr\include\apr_dso.h"\
  @@ -303,11 +303,11 @@
   	"..\..\include\pcreposix.h"\
   	"..\..\include\util_cfgtree.h"\
   	"..\..\include\util_filter.h"\
  -	"..\..\include\util_uri.h"\
   	"..\..\os\win32\os.h"\
  -	"..\..\srclib\apr-util\include\ap_buckets.h"\
  -	"..\..\srclib\apr-util\include\ap_hooks.h"\
  -	"..\..\srclib\apr-util\include\ap_ring.h"\
  +	"..\..\srclib\apr-util\include\apr_buckets.h"\
  +	"..\..\srclib\apr-util\include\apr_hooks.h"\
  +	"..\..\srclib\apr-util\include\apr_ring.h"\
  +	"..\..\srclib\apr-util\include\apr_uri.h"\
   	"..\..\srclib\apr\include\apr.h"\
   	"..\..\srclib\apr\include\apr_compat.h"\
   	"..\..\srclib\apr\include\apr_dso.h"\
  @@ -350,11 +350,11 @@
   	"..\..\include\pcreposix.h"\
   	"..\..\include\util_cfgtree.h"\
   	"..\..\include\util_filter.h"\
  -	"..\..\include\util_uri.h"\
   	"..\..\os\win32\os.h"\
  -	"..\..\srclib\apr-util\include\ap_buckets.h"\
  -	"..\..\srclib\apr-util\include\ap_hooks.h"\
  -	"..\..\srclib\apr-util\include\ap_ring.h"\
  +	"..\..\srclib\apr-util\include\apr_buckets.h"\
  +	"..\..\srclib\apr-util\include\apr_hooks.h"\
  +	"..\..\srclib\apr-util\include\apr_ring.h"\
  +	"..\..\srclib\apr-util\include\apr_uri.h"\
   	"..\..\srclib\apr\include\apr.h"\
   	"..\..\srclib\apr\include\apr_compat.h"\
   	"..\..\srclib\apr\include\apr_dso.h"\
  @@ -399,11 +399,11 @@
   	"..\..\include\util_cfgtree.h"\
   	"..\..\include\util_date.h"\
   	"..\..\include\util_filter.h"\
  -	"..\..\include\util_uri.h"\
   	"..\..\os\win32\os.h"\
  -	"..\..\srclib\apr-util\include\ap_buckets.h"\
  -	"..\..\srclib\apr-util\include\ap_hooks.h"\
  -	"..\..\srclib\apr-util\include\ap_ring.h"\
  +	"..\..\srclib\apr-util\include\apr_buckets.h"\
  +	"..\..\srclib\apr-util\include\apr_hooks.h"\
  +	"..\..\srclib\apr-util\include\apr_ring.h"\
  +	"..\..\srclib\apr-util\include\apr_uri.h"\
   	"..\..\srclib\apr\include\apr.h"\
   	"..\..\srclib\apr\include\apr_compat.h"\
   	"..\..\srclib\apr\include\apr_dso.h"\
  @@ -447,11 +447,11 @@
   	"..\..\include\util_cfgtree.h"\
   	"..\..\include\util_date.h"\
   	"..\..\include\util_filter.h"\
  -	"..\..\include\util_uri.h"\
   	"..\..\os\win32\os.h"\
  -	"..\..\srclib\apr-util\include\ap_buckets.h"\
  -	"..\..\srclib\apr-util\include\ap_hooks.h"\
  -	"..\..\srclib\apr-util\include\ap_ring.h"\
  +	"..\..\srclib\apr-util\include\apr_buckets.h"\
  +	"..\..\srclib\apr-util\include\apr_hooks.h"\
  +	"..\..\srclib\apr-util\include\apr_ring.h"\
  +	"..\..\srclib\apr-util\include\apr_uri.h"\
   	"..\..\srclib\apr\include\apr.h"\
   	"..\..\srclib\apr\include\apr_compat.h"\
   	"..\..\srclib\apr\include\apr_dso.h"\
  
  
  
  1.44      +4 -4      httpd-proxy/module-2.0/proxy_connect.c
  
  Index: proxy_connect.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_connect.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- proxy_connect.c	2001/05/11 17:32:28	1.43
  +++ proxy_connect.c	2001/05/22 19:37:08	1.44
  @@ -134,7 +134,7 @@
       apr_int16_t pollevent;
       apr_sockaddr_t *uri_addr, *connect_addr;
   
  -    uri_components uri;
  +    apr_uri_components uri;
       const char *connectname;
       int connectport = 0;
   
  @@ -155,7 +155,7 @@
        */
   
       /* we break the URL into host, port, uri */
  -    if (HTTP_OK != ap_parse_hostinfo_components(p, url, &uri)) {
  +    if (HTTP_OK != apr_uri_parse_hostinfo_components(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 DEFAULT_HTTPS_PORT:
  -	    case DEFAULT_SNEWS_PORT:
  +	    case APU_URI_HTTPS_DEFAULT_PORT:
  +	    case APU_URI_SNEWS_DEFAULT_PORT:
   		break;
   	    default:
   		return HTTP_FORBIDDEN;
  
  
  
  1.57      +6 -6      httpd-proxy/module-2.0/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_ftp.c,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- proxy_ftp.c	2001/05/11 17:32:32	1.56
  +++ proxy_ftp.c	2001/05/22 19:37:09	1.57
  @@ -135,7 +135,7 @@
       else {
   	return DECLINED;
       }
  -    def_port = ap_default_port_for_scheme("ftp");
  +    def_port = apr_uri_default_port_for_scheme("ftp");
   
       ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
   		 "proxy: FTP: canonicalising URL %s", url);
  @@ -289,9 +289,9 @@
       if (HEADER == ctx->state) {
   
   	/* Save "scheme://site" prefix without password */
  -	site = ap_unparse_uri_components(p, &f->r->parsed_uri, UNP_OMITPASSWORD|UNP_OMITPATHINFO);
  +	site = apr_uri_unparse_components(p, &f->r->parsed_uri, UNP_OMITPASSWORD|UNP_OMITPATHINFO);
   	/* ... and path without query args */
  -	path = ap_unparse_uri_components(p, &f->r->parsed_uri, UNP_OMITSITEPART|UNP_OMITQUERY);
  +	path = apr_uri_unparse_components(p, &f->r->parsed_uri, UNP_OMITSITEPART|UNP_OMITQUERY);
   	(void)decodeenc(path);
   
   	/* Copy path, strip (all except the last) trailing slashes */
  @@ -510,12 +510,12 @@
       if (log_it)
   	ap_log_rerror(APLOG_MARK, APLOG_INFO|APLOG_NOERRNO, 0, r,
   		      "proxy: missing or failed auth to %s",
  -		      ap_unparse_uri_components(r->pool,
  +		      ap_uri_unparse_components(r->pool,
   		      &r->parsed_uri, UNP_OMITPATHINFO));
   
       apr_table_setn(r->err_headers_out, "WWW-Authenticate",
                     apr_pstrcat(r->pool, "Basic realm=\"",
  -		  ap_unparse_uri_components(r->pool, &r->parsed_uri,
  +		  ap_uri_unparse_components(r->pool, &r->parsed_uri,
   		    UNP_OMITPASSWORD|UNP_OMITPATHINFO),
   		    "\"", NULL));
   
  @@ -602,7 +602,7 @@
       connectname = r->parsed_uri.hostname;
       connectport = (r->parsed_uri.port != 0)
   	           ? r->parsed_uri.port
  -	           : ap_default_port_for_request(r);
  +	           : apr_uri_default_port_for_scheme("ftp");
       path = apr_pstrdup(p, r->parsed_uri.path);
       path = (path != NULL && path[0] != '\0') ? &path[1] : "";
   
  
  
  
  1.71      +4 -4      httpd-proxy/module-2.0/proxy_http.c
  
  Index: proxy_http.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-2.0/proxy_http.c,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- proxy_http.c	2001/05/11 17:32:37	1.70
  +++ proxy_http.c	2001/05/22 19:37:13	1.71
  @@ -93,7 +93,7 @@
       else {
   	return DECLINED;
       }
  -    def_port = ap_default_port_for_scheme(scheme);
  +    def_port = apr_uri_default_port_for_scheme(scheme);
   
       ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
   		 "proxy: HTTP: canonicalising URL %s", url);
  @@ -205,7 +205,7 @@
       char buffer[HUGE_STRING_LEN];
       char *buf;
       conn_rec *origin = NULL;
  -    uri_components uri;
  +    apr_uri_components uri;
       proxy_conn_rec *backend;
   
       /* Note: Memory pool allocation.
  @@ -252,12 +252,12 @@
        */
   
       /* we break the URL into host, port, uri */
  -    if (HTTP_OK != ap_parse_uri_components(p, url, &uri)) {
  +    if (HTTP_OK != ap_uri_parse_components(p, url, &uri)) {
   	return ap_proxyerror(r, HTTP_BAD_REQUEST,
   			     apr_pstrcat(p,"URI cannot be parsed: ", url, NULL));
       }
       if (!uri.port) {
  -	uri.port = ap_default_port_for_scheme(uri.scheme);
  +	uri.port = apr_uri_default_port_for_scheme(uri.scheme);
       }
   
       ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server,
  
  
  

Mime
View raw message