httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Malo>
Subject Re: [users@httpd] RewriteMap script puts newline character in URL
Date Wed, 17 Dec 2003 23:19:22 GMT
* Mark Thias <> wrote:

> I'm trying to use a RewriteMap and a RewriteRule for load balancing. I use a
> python script in the RewriteMap to modify the URL but I get a newline
> character in the URL which causes a browser error.
> HTTP ERROR: 404 /ctms/%0D Not Found 

Well, this is half a windows newline. (CR)
mod_rewrite should recognize it. Can you please file a bugreport regarding
the issue? (That way it doesn't get forgotten) A workaround for now is
described below.

> #!c:\Tools\Python23\python.exe

try adding the -u commandline option, like

#!c:\Tools\Python23\python.exe -u

If it doesn't work, use the -u option in your RewriteMap definition.

>         sys.stdout.flush()  ( if I don't have this, does not remap )

If you're using -u, this line is probably no longer necessary. In particular
it switches the channels (stdin/out/err) to unbuffered and binary handling.

(all untested, as usual ;-)


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message