[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-httpd-dev
Subject: Re: trying to fix a bug: Proxying indexes
From: Andre_Luís_Quintaes_Guimarães <andre.guimaraes () hostgold ! com
Date: 2004-05-24 4:45:14
Message-ID: 016a01c44149$e78f4200$4100a8c0 () walker
[Download RAW message or body]
Again I ask for excuses, I have been trying to fix this for a month, today after \
deciding dedicate more time and mess a little bit with the code by myself, I found \
that this is the problem (mod_proxy):
/* is this for us? */
if ( !r->proxyreq || !r->filename || strncmp(r->filename, "proxy:", 6) != 0)
return DECLINED;
In my debugging I found out that mod_proxy_http returns proxyreq=2 (correct), but \
somewhere it gets lost (in mod_rewrite it seems) and for my subreq scenario when \
apache reaches the above code, proxyreq is null.
My fix:
As any proxy request must start with proxy: i thought that !r->proxyreq was \
redundant, so I took it out.
/* is this for us? */
if ( !r->filename || strncmp(r->filename, "proxy:", 6) != 0)
return DECLINED;
I now this is wrong and its a mess, so I still would appreciate if anyone point me \
the correct fix because there are too many changes mentioning proxyreq on mod_rewrite \
(it looks like the problem now still lies on mod_rewrite.c) for me to figure out \
exactly what I need. The right thing would be to correctly pass r->proxyreq, anyone \
knows how? Sorry for profanating such nicely writen code with such a lame fix :P
I havent tested it enough, its working alright for now (on a test server), but Im \
afraid to put it in production with hundreds of vhosts, can anyone foresee problems \
in it? Is it safe to use?
btw, apache is wonderful, keep up the great work
----- Original Message -----
[Sun May 23 21:56:49 2004] [debug] proxy_http.c(109): proxy: HTTP: canonicalising \
URL //www.t5.com
.br/f.zip
[Sun May 23 21:56:49 2004] [error] [client 200.142.70.34] File does not exist: \
proxy:http://www.t5
.com.br/f.zip
What I understood is that mod_proxy_http received the requested, but handled \
incorrectly as it tries to find the file proxy:http://www.t5.com.br/f.zip on the \
site, kinda silly.
Thanks again,
http://www.hostgold.com.br
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Again I ask for excuses, I have been trying to fix
this for a month, today after deciding dedicate more time and mess a little
bit with the code by myself, I found that this is the problem
(mod_proxy):</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> /* is this for us?
*/<BR> if ( !r->proxyreq || !r->filename ||
strncmp(r->filename, "proxy:", 6) !=
0)<BR> return
DECLINED;<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>In my debugging I found out that mod_proxy_http
returns proxyreq=2 (correct), but somewhere it gets lost (in mod_rewrite it
seems) and for my subreq scenario when apache reaches the above code, proxyreq
is null.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>My fix:</FONT></DIV>
<DIV><FONT face=Arial size=2>As any proxy request must start with proxy: i
thought that !r->proxyreq was redundant, so I took it out.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> /* is this for us?
*/<BR> if ( !r->filename || strncmp(r->filename,
"proxy:", 6) != 0)<BR> return
DECLINED;<BR>I now this is wrong and its a mess, so I still would appreciate if
anyone point me the correct fix because there are too many changes mentioning
proxyreq on mod_rewrite (it looks like the problem now still lies on
mod_rewrite.c) for me to figure out exactly what I need. The right thing
would be to correctly pass r->proxyreq, anyone knows how? Sorry for
profanating such nicely writen code with such a lame fix :P</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I havent tested it enough, its working alright
for now (on a test server), but Im afraid to put it in production with hundreds
of vhosts, can anyone foresee problems in it? Is it safe to use?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>btw, apache is wonderful, keep up the great
work</DIV></FONT>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 \
2px solid; MARGIN-RIGHT: 0px"> <DIV style="FONT: 10pt arial">----- Original Message \
----- </DIV> <DIV style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: \
black"><FONT face=Arial size=2>[Sun May 23 21:56:49 2004] [debug] \
proxy_http.c(109): proxy: HTTP: canonicalising URL \
//www.t5.com<BR>.br/f.zip<BR>[Sun May 23 21:56:49 2004] [error] [client \
200.142.70.34] File does not exist: \
proxy:http://www.t5<BR>.com.br/f.zip<BR></FONT></DIV> <DIV><FONT face=Arial \
size=2>What I understood is that mod_proxy_http received the requested, but handled \
incorrectly as it tries to find the file proxy:http://www.t5.com.br/f.zip on the \
site, kinda silly.<BR></DIV></FONT> <DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Thanks again,</FONT></DIV>
<DIV></FONT>
<DIV><FONT face=Arial size=2></FONT></DIV><FONT face=Arial size=2><A
href="http://www.hostgold.com.br">http://www.hostgold.com.br</A>
</FONT></DIV></DIV></BLOCKQUOTE></BODY></HTML>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic