1
0
mirror of https://github.com/apache/httpd.git synced 2026-01-06 09:01:14 +03:00
Commit Graph

1784 Commits

Author SHA1 Message Date
Christophe Jaillet
593715fd4a Remove some spaces between some return statements and ';' + fix a strange formating in a 'for' loop
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1673368 13f79535-47bb-0310-9956-ffa450edef68
2015-04-14 06:03:13 +00:00
Rainer Jung
9c70146b34 More followon to r1671397 for proxy server-status
in auto mode:
- remove remaining HTML markup


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1672564 13f79535-47bb-0310-9956-ffa450edef68
2015-04-10 06:55:48 +00:00
Rainer Jung
bc86b132b5 Followon to r1671397 for proxy server-status
in auto mode:
- don't show HTML legend
- Show correct worker name


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1672466 13f79535-47bb-0310-9956-ffa450edef68
2015-04-09 19:20:14 +00:00
Rainer Jung
0c12000aed Add output for "?auto" version of server-status
to proxy status, mod_ssl session cache info,
mod_cache_socache and the status hook of the
individual socache implementations.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1671397 13f79535-47bb-0310-9956-ffa450edef68
2015-04-05 13:54:22 +00:00
William A. Rowe Jr
776ab659a6 Correct MS-DOS check-in crap on text files
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1669682 13f79535-47bb-0310-9956-ffa450edef68
2015-03-27 20:46:11 +00:00
Christophe Jaillet
6c3c048b7a s/apr_pstrndup/apr_pstrmemdup/ when applicable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1669461 13f79535-47bb-0310-9956-ffa450edef68
2015-03-26 22:12:14 +00:00
Yann Ylavic
94610cc166 mod_proxy_wstunnel: Avoid an empty response by failing with 502 (Bad Gateway)
when no response is ever received from the backend.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1669299 13f79535-47bb-0310-9956-ffa450edef68
2015-03-26 09:07:54 +00:00
Yann Ylavic
549749d283 mod_proxy_{connect,wstunnel}: follow up to r1657636.
Since rv is not used as an apr_status_t in the loop (it's logging is done by
proxy_{connect,wstunnel}_transfer() when necessary/relevent), use a boolean
instead to avoid the ugly ORs between APR error codes.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1669130 13f79535-47bb-0310-9956-ffa450edef68
2015-03-25 15:00:37 +00:00
Jan Kaluža
fd61b03b75 * mod_proxy: Allow setting options to globally defined balancer from
ProxyPass used in VirtualHost. Balancers are now merged using the new
  merge_balancers method which merges the balancers options.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1667707 13f79535-47bb-0310-9956-ffa450edef68
2015-03-19 11:29:55 +00:00
Yann Ylavic
0a431ef862 core, modules: like r1657897 but for core and other modules than mod_proxy.
More uses of ap_map_http_request_error() and AP_FILTER_ERROR so that we never
return an HTTP error status from a handler if some filter generated a response
already.

That is, from a handler, either ap_get_brigade() (an input filter) returned
AP_FILTER_ERROR and we must forward it to ap_die(), or ap_pass_brigade() (an
output filter) failed with any status and we must return AP_FILTER_ERROR in
any case for ap_die() to determine whether a response is needed or not.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1665625 13f79535-47bb-0310-9956-ffa450edef68
2015-03-10 17:25:17 +00:00
Yann Ylavic
59240d4951 mod_proxy: use the original (non absolute) form of the request-line's URI
for requests embedded in CONNECT payloads used to connect SSL backends via
a ProxyRemote forward-proxy. PR 55892.

Submitted by: Hendrik Harms <hendrik.harms gmail com>
Reviewed  by: wrowe, ylavic
Committed by: ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1665215 13f79535-47bb-0310-9956-ffa450edef68
2015-03-09 12:45:56 +00:00
Ruediger Pluem
6864b2c781 * Do not reset the retry timeout if the worker is in error at this stage even
if the connection to the backend was successful. It was likely set into
   error by a different thread / process in parallel e.g. for a timeout or
   bad status. We should respect this and should not continue with a connection
   via this worker even if we got one.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664709 13f79535-47bb-0310-9956-ffa450edef68
2015-03-06 19:31:42 +00:00
Jim Jagielski
83c5985cbb Fresheh html
BUGZ:55466

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664356 13f79535-47bb-0310-9956-ffa450edef68
2015-03-05 14:35:34 +00:00
Ruediger Pluem
70201cd149 * Fix typo in error message
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1664133 13f79535-47bb-0310-9956-ffa450edef68
2015-03-04 20:16:34 +00:00
Rainer Jung
21729aacfe mod_proxy_ajp: Forward SSL_PROTOCOL. Forthcoming
versions of Tomcat know how to extract the information
and provide it as a request attribute.

Compatibility is not broken, because we forward it
as a named request attribute, not with a new byte
encoded name.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1661067 13f79535-47bb-0310-9956-ffa450edef68
2015-02-20 07:27:44 +00:00
Yann Ylavic
de86d7812f mod_proxy_http: Use the "Connection: close" header for requests to
backends not recycling connections (disablereuse), including the default
reverse and forward proxies.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1658765 13f79535-47bb-0310-9956-ffa450edef68
2015-02-10 17:25:54 +00:00
Yann Ylavic
2ebf887e1b mod_proxy_http: Don't expect the backend to ack the "Connection: close" to
finally close those not meant to be kept alive by SetEnv proxy-nokeepalive
or force-proxy-request-1.0, and respond with 502 instead of 400 if its
Connection header is invalid.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1658760 13f79535-47bb-0310-9956-ffa450edef68
2015-02-10 17:03:05 +00:00
Yann Ylavic
b26841b8dc mod_proxy(es): Avoid error response/document handling by the core if some
input filter already did it while reading client's payload.

When an input filter returns AP_FILTER_ERROR, it has already called ap_die()
or at least already responded to the client.

Here we don't want to lose AP_FILTER_ERROR when returning from proxy handlers,
so we use ap_map_http_request_error() to forward any AP_FILTER_ERROR to
ap_die() which knows whether a response needs to be completed or not.

Before this commit, returning an HTTP error code in this case caused a double
response to be generated.

Depends on r1657881 to preserve r->status (for logging) when nothing is to be
done by ap_die() when handling AP_FILTER_ERROR.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1657897 13f79535-47bb-0310-9956-ffa450edef68
2015-02-06 16:54:16 +00:00
Yann Ylavic
c6f5f2f63f mod_proxy_connect/wstunnel: If both client and backend sides get readable
at the same time, don't lose errors occuring while forwarding on the first
side when none occurs next on the other side, and abort.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1657636 13f79535-47bb-0310-9956-ffa450edef68
2015-02-05 17:36:23 +00:00
Yann Ylavic
ccc2e4c751 mod_proxy_http: don't connect or reuse backend before prefetching request body.
The goal is to minimize the delay between this connection is considered alive
and the first bytes sent (should the client's link be slow or some input filter
retain the data).
This is a best effort to prevent the backend from closing (from under us) what
it thinks is an idle connection, hence to reduce to the minimum the unavoidable
local ap_proxy_is_socket_connected() vs remote keepalive race condition.
PR 56541.

Also, allow the new subprocess_env variable "proxy-flushall" to prevent any
buffering of the request body before it is forwarded to the backend.
When set, the prefetch is still done (although non-blocking), so we can still
determine Content-Length vs chunked vs spooled (depending on data available
with the header or while reading it), and then all brigades are flushed when
passed to the backend.
PR 37920.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1656259 13f79535-47bb-0310-9956-ffa450edef68
2015-02-01 00:05:59 +00:00
Yann Ylavic
12af2e3ac2 mod_proxy_connect: fix duplicated AH introduced by r1635645.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1656230 13f79535-47bb-0310-9956-ffa450edef68
2015-01-31 18:19:59 +00:00
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
Yann Ylavic
1f6fd365c3 mod_proxy: Don't put non balancer-member workers in error state by
default for connection or 500/503 errors, and honor status=+I for
any error.  PR 48388.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1650028 13f79535-47bb-0310-9956-ffa450edef68
2015-01-07 10:36:12 +00:00
Rainer Jung
9f3e0671fd mod_proxy_ajp: Fix get_content_length().
clength in request_rec is for response sizes,
not request body size. It is initialized to 0,
so the "if" branch was never taken.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1649043 13f79535-47bb-0310-9956-ffa450edef68
2015-01-02 14:28:39 +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
c54599cf61 PR 56603: Inappropiate ProxyPassReverse match when interpolated URL
is empty string 

Submitted By: <ajprout hotmail.com>
Committed By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1648433 13f79535-47bb-0310-9956-ffa450edef68
2014-12-29 21:05:56 +00:00
Eric Covener
23c292e6cd Change the return value to const, so the const non-matching input can just be
returned.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1647334 13f79535-47bb-0310-9956-ffa450edef68
2014-12-22 15:39:54 +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
85d1a0ba01 Allow SetHandler+UDS+fcgi to take advantage of dedicated workers including
opting in to connection reuse and other proxy options (max=, etc).

adds 'enablereuse' proxyoption and a minor MMN bump to share
proxy_desocketfy outside of mod_proxy.c, which is required to
match workers to URLs.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1647009 13f79535-47bb-0310-9956-ffa450edef68
2014-12-20 15:56:16 +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
Yann Ylavic
0c5d74a177 mod_proxy: don't add the default port to the name of proxy workers. PR 57259.
ap_proxy_port_of_scheme() knows more default ports than apr_unparse_uri().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1644503 13f79535-47bb-0310-9956-ffa450edef68
2014-12-10 18:45:24 +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
Yann Ylavic
04e5d83e7b mod_proxy_ajp: follow up to r1643537.
Log aborted client connections with level DEBUG only (no more noise than other proxy modules).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643543 13f79535-47bb-0310-9956-ffa450edef68
2014-12-06 15:36:19 +00:00
Yann Ylavic
c4bea1a2b6 * mod_proxy_ajp: Fix client connection errors handling and logged status
when it occurs.  PR 56823.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643537 13f79535-47bb-0310-9956-ffa450edef68
2014-12-06 14:33:52 +00:00
Christophe Jaillet
a3f6c09230 Synch trunk with 2.4.x.
In r1588495, additionnal logging has been added to 2.4.x as part of the merge.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1643434 13f79535-47bb-0310-9956-ffa450edef68
2014-12-05 21:06:31 +00:00
Christophe Jaillet
6b6f5649ab Fix curly braces style
Remove useless empty lines

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1642803 13f79535-47bb-0310-9956-ffa450edef68
2014-12-02 07:17:12 +00:00
Eric Covener
e2fafef499 elaborate on a TRACE2 message about using the default reverse
proxy worker. 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1641636 13f79535-47bb-0310-9956-ffa450edef68
2014-11-25 15:38:10 +00:00
Eric Covener
668c7200db Return a match whenever we get to the end of the worker name, regardless
of whether there is URL left.

ProxyPassMatch had been using the default worker in trunk.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1641381 13f79535-47bb-0310-9956-ffa450edef68
2014-11-24 12:36:32 +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
Yann Ylavic
a7becdbf75 mod_proxy_connect: Don't issue AH02447 on sockets hangups, let the read
determine whether it is a normal close or a real error. PR 57168.

Abort the client or backend connection on polling errors, but don't forcibly
abort the client side at the end (the core filters will do that otherwise
when necessary), so that lingering close and SSL shutdown can occur on normal
close.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1635645 13f79535-47bb-0310-9956-ffa450edef68
2014-10-31 00:07:06 +00:00
Yann Ylavic
6d40a34636 mod_proxy_wstunnel: abort backend connection on polling error to avoid
further processing (lingering close, SSL shutdown).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1635644 13f79535-47bb-0310-9956-ffa450edef68
2014-10-30 23:56:27 +00:00
Eric Covener
3eddd534ce When using EBCDIC encoding, HTTPS through ProxyPass and ProxyRemote doesn't
work correctly. PR 57092

Submitted By: Edward Lu 
Committed By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1634425 13f79535-47bb-0310-9956-ffa450edef68
2014-10-27 00:55:20 +00:00
Ruediger Pluem
26848f7a23 * Use the correct server name for SNI in case the backend SSL connection itself
is established via a proxy server.

PR: 57139
Submitted by: Szabolcs Gyurko <szabolcs gyurko.org>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1634120 13f79535-47bb-0310-9956-ffa450edef68
2014-10-24 19:00:10 +00:00