1
0
mirror of https://github.com/apache/httpd.git synced 2026-10-23 22:49:01 +03:00
Commit Graph

408 Commits

Author SHA1 Message Date
Nick Kew
38e269322b Introduce request taint-checking concept.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1792169 13f79535-47bb-0310-9956-ffa450edef68
2017-04-21 08:44:06 +00:00
Jean-Frederic Clere
61ca36599d Add upgrade parameter to mod_proxy_wstunnel.
That allows to upgrade to jboss-remoting for example
or to run an HTTP/1.1 backend that needs to upgrade to
WebSocket.
See also:
 https://issues.jboss.org/browse/JBCS-254
 https://issues.jboss.org/browse/JBCS-291


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1792092 13f79535-47bb-0310-9956-ffa450edef68
2017-04-20 17:07:32 +00:00
Eric Covener
37c5465898 add no-proxy envvar for mod_proxy
replacement for ProxyPass /path ! when ProxyPass is in
location context.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1781328 13f79535-47bb-0310-9956-ffa450edef68
2017-02-01 22:33:10 +00:00
Eric Covener
e2e6e5194f revert r1780909 and r1773397 ProxyPass ! perdir
r1773397 had a regression and the whole thing is fishy
to shoehorn the current ProxyPass ! syntax into.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1781324 13f79535-47bb-0310-9956-ffa450edef68
2017-02-01 22:11:49 +00:00
Eric Covener
db1c9beec9 "fix" regression in r1773397.
committing for discussion purposes to trunk.  I have reopened PR60458 because
I am tempted to revert the entire thing, it was not really a release-to-release
regression because the reporter arbitrarily used a new 2.4 syntax and the semantics
were unclear.

It is useful to have global exceptions apply to per-location proxypass, but it totally
breaks the "fast" lookup part of it.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1780909 13f79535-47bb-0310-9956-ffa450edef68
2017-01-30 12:59:09 +00:00
Eric Covener
ff7722bc9a ProxyPass ! doesn't block per-directory ProxyPass
*) mod_proxy: Honor a server scoped ProxyPass exception when ProxyPass is
     configured in <Location>, like in 2.2. PR 60458.
     [Eric Covener]


reverted in r1781324


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1773397 13f79535-47bb-0310-9956-ffa450edef68
2016-12-09 14:00:51 +00:00
Jacob Champion
a9cf5db169 mod_proxy: log diagnostics during ProxyPass[Match]
To help out users when debugging ProxyPass and ProxyPassMatch, log all
match attempts (at trace2), as well as matches that are either
successful or explicitly disabled (at trace1).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1762517 13f79535-47bb-0310-9956-ffa450edef68
2016-09-27 16:59:21 +00:00
Ruediger Pluem
fb8aa91094 * Do not overwrite r->status with access_status if access_status is OK or DONE
as in this case r->status might contain the true response code.

PR: 59869


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1753592 13f79535-47bb-0310-9956-ffa450edef68
2016-07-20 18:25:01 +00:00
William A. Rowe Jr
f4cc76ee71 Rename ap_casecmpstr[n]() to ap_cstr_casecmp[n](), update with APR doxygen
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747469 13f79535-47bb-0310-9956-ffa450edef68
2016-06-09 00:06:42 +00:00
Eric Covener
f21415d6d8 include the scheme in the error message about missing a
mod_proxy_submodule (mod_proxy_$usually_a_scheme)



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1745039 13f79535-47bb-0310-9956-ffa450edef68
2016-05-22 13:11:11 +00:00
Yann Ylavic
f9ad2754f7 mod_proxy, mod_ssl: Handle SSLProxy* directives in <Proxy> sections,
allowing per backend TLS configuration.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1740928 13f79535-47bb-0310-9956-ffa450edef68
2016-04-26 00:04:57 +00:00
Yann Ylavic
b6f5963438 mod_proxy_ajp: Add "secret" parameter to proxy workers to implement legacy
AJP13 authentication.  PR 53098.

Proposed by: Dmitry A. Bakshaev <dab1818 gmail com>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1738878 13f79535-47bb-0310-9956-ffa450edef68
2016-04-12 23:09:07 +00:00
Yann Ylavic
0e0d0b608f mod_proxy: really return an error message on invalid "flusher" value.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1738875 13f79535-47bb-0310-9956-ffa450edef68
2016-04-12 22:43:00 +00:00
Yann Ylavic
447582e5f4 mod_proxy: axe negative "ping" parameter setting and handling.
This used to check for the backend connection readability only (instead of
the full ping/100-continue round-trip), but the case is already handled by
ap_proxy_connect_backend() which is always called.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1729507 13f79535-47bb-0310-9956-ffa450edef68
2016-02-09 23:38:59 +00:00
Rainer Jung
fa29d04871 Guess some platforms need PROXY_DECLARE_DATA
for data shared between proxy modules and
declared to be extern.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1728572 13f79535-47bb-0310-9956-ffa450edef68
2016-02-05 00:16:52 +00:00
Jim Jagielski
62a5f9e552 Since these are externs, prepend proxy_
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1728148 13f79535-47bb-0310-9956-ffa450edef68
2016-02-02 15:21:38 +00:00
Jim Jagielski
1a5e92f470 With the updated ap_expr, we can now check for the
returned response body, stored in kept_body

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725822 13f79535-47bb-0310-9956-ffa450edef68
2016-01-20 22:13:02 +00:00
Rainer Jung
af14d158a3 Added many log numbers to log statements that
had none.

Those were not detected by the coccinelle script.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725485 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 12:02:41 +00:00
Rainer Jung
44ce30494e Added many log numbers to log statements that
had none.

Handled all files in modules/.

I used the coccinelle script provided by Stefan.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725392 13f79535-47bb-0310-9956-ffa450edef68
2016-01-19 00:03:18 +00:00
Jim Jagielski
99f84abbd9 Leverage the OPTIONS code for HEAD as well...
So we now support: TCP, OPTIONS and HEAD.

Right now, anything other than an error (even a 404)
is consider a PASS.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725387 13f79535-47bb-0310-9956-ffa450edef68
2016-01-18 23:23:43 +00:00
Jim Jagielski
dbc98e6175 And we now allow for health checks via OPTIONS *
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1725328 13f79535-47bb-0310-9956-ffa450edef68
2016-01-18 19:44:20 +00:00
Jim Jagielski
9f2dd3550e 1st cut of 'simple' tcp check... We reuse various proxy
function and so this *could* be more streamlined, but
use this to show how the other would work, since we need
brigades, SSL/TLS support, etc.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1724879 13f79535-47bb-0310-9956-ffa450edef68
2016-01-15 21:37:23 +00:00
Jim Jagielski
d1c307f15a per rplum suggestion. thx!
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1724017 13f79535-47bb-0310-9956-ffa450edef68
2016-01-11 13:06:03 +00:00
Jim Jagielski
0bfe3c0cd8 move to per server conf, useful for adding HealthCheckCondition
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722328 13f79535-47bb-0310-9956-ffa450edef68
2015-12-30 13:28:12 +00:00
Jim Jagielski
f5c536d00f finish looping logic... place-holder for actual checking
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722229 13f79535-47bb-0310-9956-ffa450edef68
2015-12-29 19:40:46 +00:00
Jim Jagielski
33aceece57 Commit framework impl of health-check module plus
required changes. The actual health checking is
currently in progress, but wanted to add in at
this stage.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722177 13f79535-47bb-0310-9956-ffa450edef68
2015-12-29 16:12:04 +00:00
Yann Ylavic
4bfe0a6bba Follow up to r1715880: revert more abusive ap_casecmpstr[n]() usages.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722150 13f79535-47bb-0310-9956-ffa450edef68
2015-12-29 15:32:27 +00:00
Jim Jagielski
89b29c504f Don't allow bad value to be updated
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1722137 13f79535-47bb-0310-9956-ffa450edef68
2015-12-29 14:17:26 +00:00
Christophe Jaillet
9b38fd77df Fix typo in comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1716769 13f79535-47bb-0310-9956-ffa450edef68
2015-11-26 21:27:57 +00:00
Yann Ylavic
e30575b0b0 More ap_casecmpstr[n]() usages (follow up to r1715876).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715880 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 16:48:35 +00:00
Yann Ylavic
c80e6b2a34 Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715876 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 16:46:01 +00:00
Yann Ylavic
3c9ddf44bf Revert r1715789: will re-commit without spurious functional changes.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715869 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 16:28:36 +00:00
Yann Ylavic
29843dc73f Use new ap_casecmpstr[n]() functions where appropriate (not exhaustive).
[Reverted by r1715869]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1715789 13f79535-47bb-0310-9956-ffa450edef68
2015-11-23 12:33:09 +00:00
Yann Ylavic
608a751ad6 mod_proxy: Don't put the worker in error state for 500 or 503 errors
returned by the backend unless failonstatus is configured to.  PR 56925.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1681694 13f79535-47bb-0310-9956-ffa450edef68
2015-05-26 07:25:08 +00:00
Jeff Trawick
ec8921b5c3 slight improvement to wording
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1673977 13f79535-47bb-0310-9956-ffa450edef68
2015-04-15 23:07:58 +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
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
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
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
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
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
Jan Kaluža
058348d405 mod_proxy: better check for worker->s->is_name_matchable
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1609688 13f79535-47bb-0310-9956-ffa450edef68
2014-07-11 11:09:34 +00:00
Jan Kaluža
c0a52f109d mod_proxy: add ap_proxy_define_match_worker() and use it for ProxyPassMatch
and ProxyMatch section to distinguish between normal workers and workers
with regex substitutions in the name. Implement handling of such workers
in ap_proxy_get_worker(). PR 43513


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1609680 13f79535-47bb-0310-9956-ffa450edef68
2014-07-11 10:36:15 +00:00
Christophe Jaillet
55c2568e4e s/apr_pstrndup/apr_pstrmemdup/ to save a few cycles
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1608999 13f79535-47bb-0310-9956-ffa450edef68
2014-07-09 03:47:31 +00:00
Jim Jagielski
637f263141 revert 1602523, until there is understanding
about what the actual issue and "requirement" are.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1602697 13f79535-47bb-0310-9956-ffa450edef68
2014-06-15 13:54:55 +00:00
Jim Jagielski
74820dfc57 Allow for "magic" scheme "auto" which makes the scheme of
the backend worker match whatever the scheme of the
incoming request was...

For example:

   ProxyPass / auto://foo.example.com/

If the incoming request is http:.../lala then
the resultant will be http://foo.example.com/lala

If it's wws:.../lolo then we'd send
wws://foo.example.com/lolo

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1602523 13f79535-47bb-0310-9956-ffa450edef68
2014-06-13 21:10:51 +00:00
Ruediger Pluem
a902bda003 * Give ap_proxy_post_request as chance to act correctly on the status code
by setting r->status temporarily to access_status. r->status might be
  different than access_status e.g. r->status could be HTTP_OK if e.g. we
  override the error page on the proxy or if the error was not generated
  by the backend itself but by the proxy e.g. a bad gateway.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1597352 13f79535-47bb-0310-9956-ffa450edef68
2014-05-24 20:55:52 +00:00
Jim Jagielski
2aa898bb2f strncmp(r->filename, "proxy:", 6) is faster than a
note. Plus, allows for checking even if not due to
rewrite.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1588544 13f79535-47bb-0310-9956-ffa450edef68
2014-04-18 19:21:35 +00:00