NULL);
http://www.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/httpd/src/modules/proxy/pr
oxy_http.c
I believe I made a mistake:
destportstr != NULL => will be evaluated as true when a port is given.
destport != DEFAULT_HTTP_PORT => will ALWAYS be evaluated as false
because in line 118 (proxy_http.c) destport is set to
DEFAULT_HTTP_PORT and never changes. What really has to be compared is
the value of destportstr with destport (or DEFAULT_HTTP_PORT). So the
expression should be:
atoi(destportstr) != destport
New diff:
# diff -u proxy_http.c.orig proxy_http.c
--- proxy_http.c.orig Tue Nov 23 12:05:25 2010
+++ proxy_http.c Tue Nov 23 14:00:15 2010
@@ -367,7 +367,7 @@
AP_HOOK_DECLINE(DECLINED),
&rc, r, f, desthost, destportstr, destportstr);
if (rc == DECLINED) {
- if (destportstr != NULL && destport != DEFAULT_HTTP_PORT)
+ if (destportstr != NULL && atoi(destportstr) != destport)
ap_bvputs(f, "Host: ", desthost, ":", destportstr, CRLF,
NULL);
else
ap_bvputs(f, "Host: ", desthost, CRLF, NULL);
What do you think?
Previous message: [thread] [date] [author] Next message: [thread] [date] [author]