if a timeout occurs from a blocking read; more helpful than a generic
"apr_bucket_read failed" error from some higher-up filter.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@189560 13f79535-47bb-0310-9956-ffa450edef68
script execution, preventing deadlock if stderr output fills the pipe
buffer:
* modules/generators/mod_cgi.c (log_script_err): Return a read error.
(cgi_bucket_create, cgi_bucket_dup, cgi_read_stdout, cgi_bucket_read):
New functions.
(cgi_handler): Use new CGI bucket rather than a pipe bucket if
APR_FILES_AS_SOCKETS; use zero read timeout from stdout/stderr during
script execution.
PR: 22030
Submitted by: Joe Orton, Jeff Trawick
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103437 13f79535-47bb-0310-9956-ffa450edef68
because of the changes to the argument lists of apr_mmap_dup and apr_socket_create,
2.1-dev won't build with apr and apr-util's 0.9 branch anymore
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101154 13f79535-47bb-0310-9956-ffa450edef68
mod_ext_filter/mod_cgi script children (e.g., exec failure). This
was broken after such children stopped inheriting the error log
handle.
(For this to work with mod_ext_filter, that module's LogStderr option
has to be on.)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99211 13f79535-47bb-0310-9956-ffa450edef68
be started on Unix because of such problems as bad permissions,
bad shebang line, etc.
Some minor points:
If mod_ext_filter debug is enabled, we go ahead and burn cycles
in the parent to try to discover when we won't be able to exec
the script.
The mod_cgid handler wasn't communicating the right log level to the
daemon; that was required to get the child errfn to spit out the
right message, and it may fix an existing problem.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98630 13f79535-47bb-0310-9956-ffa450edef68
with relative paths instead of absolute paths. Apache 1.3 used
absolute paths for everything except for SuExec, this brings back
that standard.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95899 13f79535-47bb-0310-9956-ffa450edef68
HEAD requests (even for CGI requests). Also do it because it fixes the cause
of .37's demise.
This also fixes a condition seen on FreeBSD-4.6 where HEAD requests on CGI
scripts would hang because the OS would return EAGAIN in log_script_err
(via apr_file_gets). Since we never read the script output, this caused
FreeBSD to not let us read stderr.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95633 13f79535-47bb-0310-9956-ffa450edef68
server_rec->keep_alive_timeout in apr_time_interval_t format (in apr
units, whatever they be), as both values exist to pass into APR, and
all APR timeouts are in apr_time_t.
Reviewed by: Cliff Woolley
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95623 13f79535-47bb-0310-9956-ffa450edef68
binary into a single structure. This allows platform integrator to manipulate
the startup parameters much more easily. Also added the detach attribute
so that each CGI binary can be spawn appropriately for the OS.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95534 13f79535-47bb-0310-9956-ffa450edef68
This removes the unnecessary overhead of the *_client_block functions.
Optimize usage of the dbuf char* (don't do pcalloc on it!)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95376 13f79535-47bb-0310-9956-ffa450edef68
apr_file_write_full is *guaranteed* to either write everything or return
an error. It'll only write short if it received an error.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95371 13f79535-47bb-0310-9956-ffa450edef68
by default and accept when set to off for the default handler, and would
reject only if set to accept for mod_cgi(d) and mod_isapi.
PR: 8234
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94751 13f79535-47bb-0310-9956-ffa450edef68
the PATH and 2) resolve perl.exe for perl, we must add the progtype so
we can override APR_PROGRAM with APR_PROGRAM_PATH. This is the API change
only for the cgi build command line option function.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94634 13f79535-47bb-0310-9956-ffa450edef68
Add an allocator-passing mechanism throughout the bucket brigades API.
From Apache's standpoint, the apr_bucket_alloc_t* used throughout a given
connection is stored in the conn_rec by the create_connection hook. That
means it's the MPM's job to optimize recycling of apr_bucket_alloc_t's --
the MPM must ensure that no two threads can ever use the same one at the
same time, for instance.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94304 13f79535-47bb-0310-9956-ffa450edef68