1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-15 11:36:47 +03:00
Commit Graph

61 Commits

Author SHA1 Message Date
Eric Covener
a8afe6572f save some bytes per Christophe's review.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1650309 13f79535-47bb-0310-9956-ffa450edef68
2015-01-08 15:28:48 +00:00
Mike Rumph
98efe0ccb1 Fix some spelling errors in mod_proxy_fcgi comments.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1648557 13f79535-47bb-0310-9956-ffa450edef68
2014-12-30 17:43:59 +00:00
Eric Covener
d77e7a6885 provide alternative PATH_INFO calculation options for proxy_fcgi.
PR 55329



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1647035 13f79535-47bb-0310-9956-ffa450edef68
2014-12-20 18:45:23 +00:00
Eric Covener
2af6b8f57f Allow (a hokey) opt-in to connection reuse for mod_proxy_fcgi + TCP.
Connection reuse has been disabled since r1032345 at the end of
2011. 

Attempt to reverse the polarity of the connection reuse doc which
has been wrong for a long time.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1647005 13f79535-47bb-0310-9956-ffa450edef68
2014-12-20 15:38:27 +00:00
Eric Covener
727a07d553 tweak SCRIPT_FILENAME passed to fastcgi backends when a balancer is used.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1646724 13f79535-47bb-0310-9956-ffa450edef68
2014-12-19 14:03:52 +00:00
Jan Kaluža
ae9b5862f6 * mod_proxy_fcgi: Follow up to r1640495. Ignore body data from backend
for 304 responses also when read with the header.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1644031 13f79535-47bb-0310-9956-ffa450edef68
2014-12-09 11:39:57 +00:00
Eric Covener
3ec0da5912 dump fcgi headers with trace8 instead of debug+compile-time flag.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643672 13f79535-47bb-0310-9956-ffa450edef68
2014-12-07 12:54:52 +00:00
Jan Kaluža
a9831ff12f * mod_proxy_fcgi: Ignore body data from backend for 304 responses. PR 57198.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1640495 13f79535-47bb-0310-9956-ffa450edef68
2014-11-19 07:19:13 +00:00
Yann Ylavic
f9520fec08 mod_proxy_fcgi, mod_authnz_fcgi: stop reading the response and issue an error
when parsing or forwarding the response fails.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1640040 13f79535-47bb-0310-9956-ffa450edef68
2014-11-16 22:25:32 +00:00
Yann Ylavic
54f0797498 mod_proxy_fcgi: SECURITY: CVE-2014-3583 (cve.mitre.org)
Fix a potential crash with response headers' size above 8K.

The code changes to mod_authnz_fcgi keep the handle_headers()
function in sync between the two modules.  mod_authnz_fcgi
does not have this issue because it allocated a separate byte
for terminating '\0'.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1640036 13f79535-47bb-0310-9956-ffa450edef68
2014-11-16 22:04:39 +00:00
Yann Ylavic
31e1a51f0f Revert r1638818, r1639812, r1639717 and r1639814 for new staging.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1640034 13f79535-47bb-0310-9956-ffa450edef68
2014-11-16 21:52:40 +00:00
Yann Ylavic
e472402601 mod_proxy_fcgi: follow up to r1638818.
Let ap_scan_script_header*() validate the headers.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1639812 13f79535-47bb-0310-9956-ffa450edef68
2014-11-15 00:35:37 +00:00
Yann Ylavic
02e736ae5a mod_proxy_fcgi: CVE-2014-3583: Fix a potential crash with response headers'
size above 8K.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1638818 13f79535-47bb-0310-9956-ffa450edef68
2014-11-12 15:41:07 +00:00
Jeff Trawick
7e9b8a0b06 mod_proxy_fcgi: Fix faulty logging of large amounts of stderr from the
application.

PR: 56858
Submitted by: Manuel Mausz <manuel-asf mausz.at>
Reviewed by: trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1618401 13f79535-47bb-0310-9956-ffa450edef68
2014-08-16 19:15:02 +00:00
Christophe Jaillet
56d0c25725 Add missing APLOGNO.
Refactor some lines to keep APLOGNO on the same line as ap_log_error, when applicable.
Split lines longer than 80.
Improve alignment.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1612068 13f79535-47bb-0310-9956-ffa450edef68
2014-07-20 09:32:58 +00:00
Yann Ylavic
aa5ca9770e mod_proxy_fcgi: follow up to r1592032.
Also break the outer loop when "sending stdin" fails.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1603122 13f79535-47bb-0310-9956-ffa450edef68
2014-06-17 10:37:15 +00:00
Jeff Trawick
e22212a41b Reindent after small fix in r1603027
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1603029 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 23:57:19 +00:00
Jeff Trawick
d6d845cfcd Fix bug introduced in r1591508 which resulted in the final empty
FCGI_STDIN not being sent.  Interaction with latest uWSGI (and
probably other protocol implementations) breaks without this.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1603027 13f79535-47bb-0310-9956-ffa450edef68
2014-06-16 23:56:06 +00:00
Jeff Trawick
a8b72c1517 mod_proxy_fcgi: Fix occasional high CPU when handling request bodies.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592037 13f79535-47bb-0310-9956-ffa450edef68
2014-05-02 20:46:28 +00:00
Jeff Trawick
31dab168f5 better diagnostics for failures during dispatch()
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592032 13f79535-47bb-0310-9956-ffa450edef68
2014-05-02 20:33:57 +00:00
Jeff Trawick
5dac70c7aa mod_proxy_fcgi: Support iobuffersize parameter.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591508 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 22:52:41 +00:00
Jeff Trawick
cc065dba44 Axe unnecessary memset() calls and allocating an extra
byte in an I/O buffer for '\0', which hasn't been needed
since a strstr("\r\n\r\n") was removed in r371428.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1591472 13f79535-47bb-0310-9956-ffa450edef68
2014-04-30 20:21:03 +00:00
Jeff Trawick
eb9b6affd5 mod_proxy_fcgi: Don't segfault when failing to connect to the backend.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1590437 13f79535-47bb-0310-9956-ffa450edef68
2014-04-27 18:10:03 +00:00
Jeff Trawick
7775249b30 mod_proxy_fcgi: Fix sending of response without some HTTP headers
that might be set by filters.

The problem occurs when no body bytes were read while reading the
response headers, resulting in an empty brigade being sent down
the filter stack.  One particualr filter that mishandles the empty
initial brigade is mod_deflate.  It neglects to add to the response
header fields.

PR: 55558
Submitted by: Jim Riggs <jim riggs.me>
Reviewed by: trawick


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1585824 13f79535-47bb-0310-9956-ffa450edef68
2014-04-08 20:07:04 +00:00
Jeff Trawick
304da56908 mod_proxy_fcgi: Fix error message when an unexpected protocol version
number is received from the application.

PR: 56110


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1564756 13f79535-47bb-0310-9956-ffa450edef68
2014-02-05 12:58:11 +00:00
Jim Jagielski
bb76893cfb We were not being consistent between http and others
if we added the default port or not during the canonizing
phase... Baseline the http method (don't add unless the
port provided isn't the default).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1542562 13f79535-47bb-0310-9956-ffa450edef68
2013-11-16 20:13:48 +00:00
Jeff Trawick
d79b9a03c5 mod_proxy: Add ap_connection_reusable() for checking if a connection
is reusable as of this point in processing.

mod_proxy_fcgi uses the new API to determine if FCGI_CONN_CLOSE
should be enabled, but that doesn't change existing behavior
since the connection is currently marked for closure elsewhere
in the module.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1526189 13f79535-47bb-0310-9956-ffa450edef68
2013-09-25 14:29:02 +00:00
Jeff Trawick
2809f49e71 Use ap_log_rdata() to dump the FastCGI header, axing a bunch
of custom data dumping code.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1525281 13f79535-47bb-0310-9956-ffa450edef68
2013-09-21 18:59:47 +00:00
Jeff Trawick
76dc5d2055 Borrow a fix from mod_authnz_fcgi:
mod_proxy_fcgi: Handle reading protocol data that is split between
packets.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1525280 13f79535-47bb-0310-9956-ffa450edef68
2013-09-21 18:48:20 +00:00
Jeff Trawick
6a64fadd63 Bring some envvar flexibility from mod_authnz_fcgi to mod_proxy_fcgi:
mod_proxy_fcgi: Remove 64K limit on encoded length of all envvars.
An individual envvar with an encoded length of more than 16K will be
omitted.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1525276 13f79535-47bb-0310-9956-ffa450edef68
2013-09-21 18:29:57 +00:00
Jan Kaluža
40538bb4be Use apr_socket_timeout_get instead of hard-coded 30 seconds timeout.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1524368 13f79535-47bb-0310-9956-ffa450edef68
2013-09-18 11:18:02 +00:00
Jeff Trawick
67b1aa4bd8 Switch from private FastCGI protocol handling to util_fcgi API.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1523281 13f79535-47bb-0310-9956-ffa450edef68
2013-09-14 18:14:49 +00:00
Guenter Knauf
3400ec7e6a Fix some compiler warnings.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1500423 13f79535-47bb-0310-9956-ffa450edef68
2013-07-07 13:04:39 +00:00
Stefan Fritsch
555c89745f If there is an error reading the headers from the backend,
send an error to the client


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1311172 13f79535-47bb-0310-9956-ffa450edef68
2012-04-09 09:28:14 +00:00
Jim Jagielski
732f60dc2c Handle cases, esp when using mod_proxy_fcgi, when we do not
want SCRIPT_FILENAME to include the query string.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1242351 13f79535-47bb-0310-9956-ffa450edef68
2012-02-09 15:07:22 +00:00
Stefan Fritsch
92e366007c Add lots of unique tags to error log messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Stefan Fritsch
8ec7f5c5bf great proxy logging cleanup:
* remove "proxy:", "FCGI", etc. prefixes and pid which are now
    included in the error log format

  * propagate frontend request's logconfig to backend request
    
  * use ap_log_rerror where possible
    
  * remove obsolete APLOG_NOERRNO


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1203859 13f79535-47bb-0310-9956-ffa450edef68
2011-11-18 21:41:09 +00:00
Rainer Jung
219333e4bf Silence compiler warning about signedness differences.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1199435 13f79535-47bb-0310-9956-ffa450edef68
2011-11-08 20:14:12 +00:00
Stefan Fritsch
1951a037bf More cleanup: Expand tabs and some more indentation fixes
No functional change


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +00:00
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Stefan Fritsch
beb3ea9c11 Add more (trace) logging to the ap_scan_script_header*() functions
Add ap_scan_script_header*_ex() functions that take a module index for
logging.
Make mod_cgi, mod_cgid, mod_proxy_fcgi, mod_proxy_scgi, mod_isapi use the
new functions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147493 13f79535-47bb-0310-9956-ffa450edef68
2011-07-16 21:53:18 +00:00
Jim Jagielski
d80376cdab *) mod_proxy_fcgi: Add support for 'ProxyErrorOverride on' PR 50913.
[Mark Montague <mark catseye.org>, Jim Jagielski]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1087863 13f79535-47bb-0310-9956-ffa450edef68
2011-04-01 19:25:23 +00:00
Jim Jagielski
b6debecc34 Fix/workaround for BUGZ PR 50851.
By default, mod_proxy_fcgi with not create PATH_INFO, unless
specifically told to.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1078089 13f79535-47bb-0310-9956-ffa450edef68
2011-03-04 18:31:17 +00:00
Jim Jagielski
201bbd1ba9 More movement to shared stuff...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1058623 13f79535-47bb-0310-9956-ffa450edef68
2011-01-13 15:58:57 +00:00
Jeff Trawick
a1a3d3820c mark connection for close after the return from
ap_proxy_determine_connection()

before this revision: if there was an existing connection,
ap_proxy_determine_connection() would close it but then clear
the close flag, so it didn't get closed by
ap_proxy_release_connection()

thus, if this child process doesn't use the connection for a
while, the application could be stuck in read() for the same
while

after: ap_proxy_release_connection() will close it after the
request completes


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032345 13f79535-47bb-0310-9956-ffa450edef68
2010-11-07 18:54:44 +00:00
Jeff Trawick
2c8ec34cd0 avoid duplicate end-of-stdin header
avoid passing {iov_base = &buffer, iov_len=0} to writev() when
there is no stdin data


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1032266 13f79535-47bb-0310-9956-ffa450edef68
2010-11-07 12:35:32 +00:00
Jeff Trawick
91ab95835f repeat apr_poll() while EINTR
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1031613 13f79535-47bb-0310-9956-ffa450edef68
2010-11-05 15:04:37 +00:00
Stefan Fritsch
aa576071af - Remove a load of unused variables (or variables that are set but never read).
- Move some declarations into the correct #ifdef scope.

I couldn't compile/test netware, but the changes look obvious enough.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982016 13f79535-47bb-0310-9956-ffa450edef68
2010-08-03 19:45:21 +00:00
Stefan Fritsch
01b9f2e551 - Be less verbose at levels INFO and DEBUG in mod_proxy* and mod_ssl
- Add some trace logging to core and http


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951900 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 17:07:12 +00:00
Stefan Fritsch
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00