Re:Re: Tux and HTTP request forwarding
"Javier Martin" <[email protected]>
| Newsgroups | gmane.network.tux |
|---|---|
| Message-ID | <003301c276fe$f42bd800$8432a8c0@mcpollo> |
Hi Ingo,
> > It seems that TUX will systematically try and forward an http
request
> > the secondary server if the URL contains a query string. Is there a
way
> > to disable this behaviour?
>
> right now the easiest way is to change net/tux/proto_http.c, and
replace
> the two occurances of:
>
> c == '?'
>
> with:
> 0
>
> from this point on TUX should treat the query string as part of the
URL.
This won't run (at least as of Tux 2.2.5), it only makes the querystring
be part of the filename, and tux simply won't be able to find the file.
This is more appropriate, at proto_http.c, there is something like:
>>>>>>>>>>>>>>>>>>>>>>>>>>
default:
if (req->query_str) {
req->error = TUX_ERROR_REDIRECT;
goto error;
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>
Just comment the whole 'if'. We want Tux to handle requests even if they
carry query string stuff!
> Btw., why do you want to do this?
Why not? It is the standard HTTP. Why should Tux want to redirect those
requests to userspace? I suppose there must be a reason why the author
of that piece of code did not want Tux to process querystring requests
but I cannot guess it...
Javier