You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by James Tait <JT...@wyrddreams.demon.co.uk> on 2002/05/23 18:33:53 UTC

[PATCH] prg: type RewriteMap can now take arguments again

See bugzilla id #8464 for details, but currently in 2.0.36 you cannot 
specify command-line arguments to an external rewrite program, thus:

RewriteMap "prg:/path/to/my/engine -arg1 -arg2"

This was valid in 1.3.24, as it exec'd a shell with the "-c 
/path/to/my/engine -arg1 -arg2" arguments.

Hopefully this patch should enable us to be able to supply command-line 
arguments to our external program again, negating the need for a shell 
script wrapper and meaning the configuration is all in httpd.conf.

Cheers,

JT
-- 
+------------------------------------+------------------------------------+
| James Tait                         | ICQ# 17834893                      |
| MUD programmer and Linux advocate  | http://www.wyrddreams.demon.co.uk/ |
+------------------------------------+------------------------------------+


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________

RE: [PATCH] prg: type RewriteMap can now take arguments again

Posted by Ryan Bloom <rb...@covalent.net>.
> From: James Tait [mailto:JTait@wyrddreams.demon.co.uk]
> 
> See bugzilla id #8464 for details, but currently in 2.0.36 you cannot
> specify command-line arguments to an external rewrite program, thus:
> 
> RewriteMap "prg:/path/to/my/engine -arg1 -arg2"
> 
> This was valid in 1.3.24, as it exec'd a shell with the "-c
> /path/to/my/engine -arg1 -arg2" arguments.
> 
> Hopefully this patch should enable us to be able to supply
command-line
> arguments to our external program again, negating the need for a shell
> script wrapper and meaning the configuration is all in httpd.conf.

In general, this is good, but it duplicates some logic already in apr.
There is a function, tokenize_to_argv, which given a string, will pass
back an argv array.  If we use that, then we get the ability to quote
the arguments, and there is less duplicate code.  Please re-submit with
that change, and I will apply the patch.

Ryan