httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ch...@apache.org
Subject cvs commit: httpd-2.0/modules/proxy mod_proxy.c
Date Wed, 07 Feb 2001 05:40:43 GMT
chuck       01/02/06 21:40:43

  Modified:    modules/proxy mod_proxy.c
  Log:
  Changes to get running on the current codebase
  
  Revision  Changes    Path
  1.21      +9 -10     httpd-2.0/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/mod_proxy.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_proxy.c	2001/01/19 07:04:25	1.20
  +++ mod_proxy.c	2001/02/07 05:40:42	1.21
  @@ -225,8 +225,10 @@
   /* canonicalise each specific scheme */
       if (strncasecmp(url, "http:", 5) == 0)
   	return ap_proxy_http_canon(r, url + 5, "http", DEFAULT_HTTP_PORT);
  +#if FTP
       else if (strncasecmp(url, "ftp:", 4) == 0)
   	return ap_proxy_ftp_canon(r, url + 4);
  +#endif
   
       p = strchr(url, ':');
       if (p == NULL || p == url)
  @@ -394,8 +396,10 @@
   	return ap_proxy_connect_handler(r, url, NULL, 0);
       if (strcasecmp(scheme, "http") == 0)
   	return ap_proxy_http_handler(r, url, NULL, 0);
  +#if FTP
       if (strcasecmp(scheme, "ftp") == 0)
   	return ap_proxy_ftp_handler(r, NULL, url);
  +#endif
       else
   	return HTTP_FORBIDDEN;
   }
  @@ -709,12 +713,6 @@
       return NULL;    
   }
   
  -static const handler_rec proxy_handlers[] =
  -{
  -    {"proxy-server", proxy_handler},
  -    {NULL}
  -};
  -
   static const command_rec proxy_cmds[] =
   {
       AP_INIT_FLAG("ProxyRequests", set_proxy_req, NULL, RSRC_CONF,
  @@ -746,11 +744,13 @@
   
   static void register_hooks(apr_pool_t *p)
   {
  -    /* [2] filename-to-URI translation */
  +    /* handler */
  +    ap_hook_handler(proxy_handler, NULL, NULL, APR_HOOK_FIRST);
  +    /* filename-to-URI translation */
       ap_hook_translate_name(proxy_trans, NULL, NULL, APR_HOOK_FIRST);
  -    /* [8] fixups */
  +    /* fixups */
       ap_hook_fixups(proxy_fixup, NULL, NULL, APR_HOOK_FIRST);
  -    /* [1] post read_request handling */
  +    /* post read_request handling */
       ap_hook_post_read_request(proxy_detect, NULL, NULL, APR_HOOK_FIRST);
   }
   
  @@ -762,6 +762,5 @@
       create_proxy_config,	/* create per-server config structure */
       NULL,			/* merge per-server config structures */
       proxy_cmds,			/* command table */
  -    proxy_handlers,		/* handlers */
       register_hooks
   };
  
  
  

Mime
View raw message