18 months later: Tux and HTTP request forwarding

Charles Bennington <[email protected]>
Newsgroups gmane.network.tux
Message-ID <[email protected]>
I have been looking for a way to have tux always handle requests for 
URLs with a question mark in them, but also discard the text including 
and following the question mark.  For example:

http://site/path/file?args ==> http://site/path/file

This is in an attempt to serve files that are static by design by have a 
random argument appended to the end to defeat browser caching.  Looking 
through the archives, I found the message found at the bottom of this 
email and implemented it.  As far as I can tell, it is only solving half 
of my problem.  Now the URLs with question marks are being processed by 
tux, but tux is returning a 404 because the file does not exist.  It is 
looking for "file?args" rather than "file".

Does anyone have any insight in to this and/or suggestions?  They would 
be greatly appreciated.

Charles Bennington

---------------------------------------------------------------------------------------------------------------------

Re: Tux and HTTP request forwarding
------------------------------------------------------------------------

    * /From/: Ingo Molnar <mingo elte hu>
    * /To/: tux-list redhat com
    * /Subject/: Re: Tux and HTTP request forwarding
    * /Date/: Thu, 25 Apr 2002 18:23:37 +0200 (CEST)

------------------------------------------------------------------------

On Thu, 25 Apr 2002, Serge Sozonoff wrote:

> 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.

btw., why do you want to do this?

	Ingo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.