You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by bu...@apache.org on 2024/08/10 17:30:50 UTC
[Bug 69256] New: RewriteMap prg: details missing
https://bz.apache.org/bugzilla/show_bug.cgi?id=69256
Bug ID: 69256
Summary: RewriteMap prg: details missing
Product: Apache httpd-2
Version: 2.4.62
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Documentation
Assignee: docs@httpd.apache.org
Reporter: chead@chead.ca
Target Milestone: ---
The documentation for RewriteMap prg: here
<https://httpd.apache.org/docs/2.4/rewrite/rewritemap.html#prg> left me with a
number of questions that I could not find the answer to:
* “it expects one argument via STDIN” What exactly does this mean? Each key fed
to stdin is followed by a newline? A space? Something else? There’s an example,
but that’s not very useful for those of us who don’t read Perl.
* “If there is no corresponding lookup value, the map program should return the
four-character string "NULL" to indicate this.” Does this mean there’s no way
for the mapping program to return the actual literal string NULL as the mapped
value, since trying to do so indicates failure to map instead?
* The documentation explains how stdin and stdout are used. What does Apache do
with the mapping program’s stderr? Connect it to /dev/null? Not open it at all?
Something else?
* What happens if the mapping program terminates? The text “Remember that there
is only one copy of the program, started at server startup.” suggests that it
will just stay dead and mappings will fail until Apache is restarted, but is
that actually true?
* What happens when Apache terminates? Does it send a signal to terminate the
mapping program? If so, what signal? Or does it just close stdin and expect the
mapping program to terminate when it sees EOF? Since the mapping program is a
child process of Apache, does Apache wait for it to terminate before finishing
shutdown, or does it orphan it and let PID 1 deal with it?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
[Bug 69256] RewriteMap prg: details missing
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69256
--- Comment #1 from Christopher Head <ch...@chead.ca> ---
Another one. If I restart the server in a way that doesn’t terminate the parent
process but does reread configuration files (i.e. graceful/USR1 or
restart/HUP), will the mapping program be killed and restarted (1) always, (2)
never, (3) only if the configuration directives related to it have changed, or
(4) something else?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
[Bug 69256] RewriteMap prg: details missing
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69256
Rich Bowen <rb...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Rich Bowen <rb...@apache.org> ---
All of these comments have now been addressed in r1932819. I've also replaced
the Perl example with Python, since this is 2026.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org
[Bug 69256] RewriteMap prg: details missing
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69256
--- Comment #2 from timothyjmills <th...@hotmail.com> ---
(In reply to Christopher Head from comment #0)
> The documentation for RewriteMap prg: here
> <https://httpd.apache.org/docs/2.4/rewrite/rewritemap.html#prg> left me with
> a number of questions that I could not find the answer to:
> * “it expects one argument via STDIN” What exactly does this mean? Each key
> fed to stdin is followed by a newline? A space? Something else? There’s an
> example, but that’s not very useful for those of us who don’t read Perl.
> * “If there is no corresponding lookup value, the map program should return
> the four-character string "NULL" to indicate this.” Does this mean there’s
> no way for the mapping program to return the actual literal string NULL as
> the mapped value, since trying to do so indicates failure to map instead?
> * The documentation explains how stdin and stdout are used. What does Apache
> do with the mapping program’s stderr? Connect it to /dev/null? Not open it
> at all? Something else?
> * What happens if the mapping program terminates? The text “Remember that
> there is only one copy of the program, started at server startup.” suggests
> that it will just stay dead and mappings will fail until Apache is
> restarted, but is that actually true?
> * What happens when Apache terminates? Does it send a signal to terminate
> the mapping program? If so, what signal? Or does it just close stdin and
> expect the mapping program to terminate when it sees EOF? Since the mapping
> program is a child process of Apache, does Apache wait for it to terminate
> before finishing shutdown, or does it orphan it and let PID 1 deal with it?
Error reporting addresses some of the prg RewriteMap features that help you
better understand the need to more clearly explain how your program handles
input and behavior.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org