You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mt...@apache.org on 2005/04/09 18:34:34 UTC
svn commit: r160693 - httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
Author: mturk
Date: Sat Apr 9 09:34:33 2005
New Revision: 160693
URL: http://svn.apache.org/viewcvs?view=rev&rev=160693
Log:
Simplify canon_handler. There is no thing like ajps:
protocol.
Modified:
httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c?view=diff&r1=160692&r2=160693
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c Sat Apr 9 09:34:33 2005
@@ -30,23 +30,15 @@
{
char *host, *path, *search, sport[7];
const char *err;
- const char *scheme;
- apr_port_t port, def_port;
+ apr_port_t port = AJP13_DEF_PORT;
/* ap_port_of_scheme() */
if (strncasecmp(url, "ajp:", 4) == 0) {
url += 4;
- scheme = "ajp";
}
- /* XXX This is probably faulty */
- else if (strncasecmp(url, "ajps:", 5) == 0) {
- url += 5;
- scheme = "ajps";
- }
else {
return DECLINED;
}
- def_port = apr_uri_port_of_scheme(scheme);
ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server,
"proxy: AJP: canonicalising URL %s", url);
@@ -54,7 +46,6 @@
/* do syntatic check.
* We break the URL into host, port, path, search
*/
- port = def_port;
err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port);
if (err) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
@@ -81,15 +72,12 @@
if (path == NULL)
return HTTP_BAD_REQUEST;
- if (port != def_port)
- apr_snprintf(sport, sizeof(sport), ":%d", port);
- else
- sport[0] = '\0';
+ apr_snprintf(sport, sizeof(sport), ":%d", port);
if (ap_strchr_c(host, ':')) { /* if literal IPv6 address */
host = apr_pstrcat(r->pool, "[", host, "]", NULL);
}
- r->filename = apr_pstrcat(r->pool, "proxy:", scheme, "://", host, sport,
+ r->filename = apr_pstrcat(r->pool, "proxy:ajp://", host, sport,
"/", path, (search) ? "?" : "", (search) ? search : "", NULL);
return OK;
}
Re: svn commit: r160693 - httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
Posted by Mladen Turk <mt...@apache.org>.
William A. Rowe, Jr. wrote:
> At 11:34 AM 4/9/2005, mturk@apache.org wrote:
>
>>Simplify canon_handler. There is no thing like ajps:
>>protocol.
>
>
> Actually, there has to be (no?)
>
No. There is http,https,ftp,ajp,balancer.
There is no thing like ajps, but I suppose this originates
from copying the code from proxy_http.
> ajp: is a specific protocol and should be designated. E.g.
> how to I forward proxy one set of requests to x.box.net via
> an ajp proxy, while forward proxying another group to y.box.net
> via an http proxy?
>
I don't understand what you question is.
Are you asking how to configure the proxy?
Regards,
Mladen.
Re: svn commit: r160693 -
httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 11:34 AM 4/9/2005, mturk@apache.org wrote:
>Simplify canon_handler. There is no thing like ajps:
>protocol.
Actually, there has to be (no?)
ajp: is a specific protocol and should be designated. E.g.
how to I forward proxy one set of requests to x.box.net via
an ajp proxy, while forward proxying another group to y.box.net
via an http proxy?