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.
 

Reply via email to