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

2019 Commits

Author SHA1 Message Date
Christophe Jaillet
e0f539c438 Move definition of ASCII_ZERO to httpd.h and rename it ZERO_ASCII for consistancy reason.
Remove definition of ASCII_CRLF which is the same as CRLF_ASCII.

Use ZERO_ASCII and CRLF_ASCII in mod_proxy_http

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1777611 13f79535-47bb-0310-9956-ffa450edef68
2017-01-06 13:58:03 +00:00
Yann Ylavic
07ad86dc70 proxy: don't force global module selection (most) and scope (shared/static),
since it breaks --enable-modules=none + exhaustive --enable-foo(s).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1777464 13f79535-47bb-0310-9956-ffa450edef68
2017-01-05 12:50:24 +00:00
Eric Covener
c5f5760b7e let wstunnel run first
Since wstunnel can step aside based on the Upgrade: header.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1776290 13f79535-47bb-0310-9956-ffa450edef68
2016-12-28 14:54:37 +00:00
Eric Covener
281b96b078 improve a debug message
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1776285 13f79535-47bb-0310-9956-ffa450edef68
2016-12-28 14:40:54 +00:00
Luca Toscano
ef6fbcf590 Return HTTP 504 rather than 503 when a proxy timeout is hit.
Part of the review for PR: 56188



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1775858 13f79535-47bb-0310-9956-ffa450edef68
2016-12-23 17:34:11 +00:00
Yann Ylavic
0674872c16 mod_proxy_{ajp,fcgi}: Fix a possible crash when reusing an established
backend connection, happening with LogLevel trace2 or higher configured,
or at any log level with compilers not detected as C99 compliant (e.g.
MSVC on Windows).



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1775775 13f79535-47bb-0310-9956-ffa450edef68
2016-12-22 23:30:05 +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
Gregg Lewis Smith
280008d94d add mod_proxy_hcheck to legacy build
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1771839 13f79535-47bb-0310-9956-ffa450edef68
2016-11-29 03:27:37 +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
Luca Toscano
333632287c Fix stupid mistake introduced in r1759984
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1760018 13f79535-47bb-0310-9956-ffa450edef68
2016-09-09 13:33:49 +00:00
Luca Toscano
5a53fac726 mod_proxy_fcgi: handle the HTTP 412 use case
This is a follow up of http://svn.apache.org/r1752347;
ap_meet_conditions could return a 412 status that if not
handled causes subsequent bogus reads and wrong messages
logged (like AH01070). After a chat on dev@ the feedback
was to couple HTTP_NOT_MODIFIED with HTTP_PRECONDITION_FAILED,
but any other feedback is welcome.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1759984 13f79535-47bb-0310-9956-ffa450edef68
2016-09-09 11:17:36 +00:00
Ruediger Pluem
f0c5598c8c * Add missing copy of hcuri and hcexpr ftom the worker to the health check worker.
PR: 60038
Submitted by: zdeno <zdeno@scnet.sk>


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1757662 13f79535-47bb-0310-9956-ffa450edef68
2016-08-25 11:38:07 +00:00
Yann Ylavic
45d8216e5f mod_proxy_fcgi: revert r1756187.
rpluem: The default is disablereuse=off and the code you removed makes the
default disablereuse=on.

ylavic: so right..


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1757097 13f79535-47bb-0310-9956-ffa450edef68
2016-08-21 23:53:24 +00:00
Christophe Jaillet
8b44a6d937 Fix some style (spaces only)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756853 13f79535-47bb-0310-9956-ffa450edef68
2016-08-18 21:13:06 +00:00
Christophe Jaillet
44586ba955 Be more consistent when we alocate this brigade.
This should save a few bytes in case of early exit and is, IMHO, cleaner.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756852 13f79535-47bb-0310-9956-ffa450edef68
2016-08-18 21:10:37 +00:00
Yann Ylavic
2c87430863 Follow up to r1750392: reduce AH03408 level to INFO as suggested by wrowe/jim.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756531 13f79535-47bb-0310-9956-ffa450edef68
2016-08-16 16:21:13 +00:00
Yann Ylavic
ca4e35a740 mod_proxy_fcgi: forcing proxy_conn->close here is useless, same is done
either above in ap_proxy_determine_connection(), or below in
ap_proxy_release_connection().

[Reverted by r1757097]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756187 13f79535-47bb-0310-9956-ffa450edef68
2016-08-12 14:04:51 +00:00
Yann Ylavic
1bda0469cf [mod_proxy_]http: follow up to r1750392.
Export [ap_]check_pipeline() and use it also for ap_proxy_check_connection(),
so that all the necessary checks on the connection are done before reusing it.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756186 13f79535-47bb-0310-9956-ffa450edef68
2016-08-12 13:58:10 +00:00
Yann Ylavic
104ef73c95 Revert r1756064 and r1756060 until fixed (tests framework passes).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756065 13f79535-47bb-0310-9956-ffa450edef68
2016-08-11 23:37:45 +00:00
Yann Ylavic
2023d56eea [mod_proxy_]http: follow up to r1750392.
Export [ap_]check_pipeline() and use it also for ap_proxy_check_connection().

[Reverted by r1756065]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756060 13f79535-47bb-0310-9956-ffa450edef68
2016-08-11 22:32:42 +00:00
Rainer Jung
d79b514c4b Fix spelling in comments and text files.
No functional change.
PR 59990


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756038 13f79535-47bb-0310-9956-ffa450edef68
2016-08-11 19:50:02 +00:00
Yann Ylavic
da8a9b53dc Revert r1755930: actually what'd be read after AP_FCGI_END_REQUEST is padding,
not any potential/errorneous next response.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1755931 13f79535-47bb-0310-9956-ffa450edef68
2016-08-11 10:40:49 +00:00
Yann Ylavic
190d808ea4 mod_{proxy,authnz}_fcgi: follow up to r1750392.
Don't try to read past AP_FCGI_END_REQUEST on the backend side, it would be
a response for the next request.

[Reverted by r1755931]


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1755930 13f79535-47bb-0310-9956-ffa450edef68
2016-08-11 10:32:35 +00:00
Luca Toscano
798c3f4efc Revert r1754732,r1754734,r1754736 after a conversation on dev@ and IRC.
We agreed to consider r1752347 as bug fix and delay performance improvements
for later revisions.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754983 13f79535-47bb-0310-9956-ffa450edef68
2016-08-02 17:22:44 +00:00
Yann Ylavic
9d46ecdbe4 mod_proxy_http: 204 or 304 cannot happen here since ap_is_HTTP_ERROR() above
is true.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754979 13f79535-47bb-0310-9956-ffa450edef68
2016-08-02 16:42:39 +00:00
Yann Ylavic
d47374519b mod_proxy_http: handle 401 error override in the same block as other errors
to simplify logic, no functional change.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754975 13f79535-47bb-0310-9956-ffa450edef68
2016-08-02 16:34:56 +00:00
Yann Ylavic
a5e672195b mod_proxy_http: don't pretend we are sending a body before ProxyErrorOverride
takes place, the response it to be handled by ErrorDocument is this case.
Also it useless to take care of pre-read data since the body is discarded in
this case.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754974 13f79535-47bb-0310-9956-ffa450edef68
2016-08-02 16:27:26 +00:00
Luca Toscano
ef144aed6f Changed the code comments to be more clear a fixed a typo (will be more careful next time, didn't spot the problem until already committed)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754736 13f79535-47bb-0310-9956-ffa450edef68
2016-08-01 11:24:44 +00:00
Luca Toscano
b5c40d8adc Fixed a typo introduced by my previous commit, really sorry about it
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754734 13f79535-47bb-0310-9956-ffa450edef68
2016-08-01 11:01:04 +00:00
Luca Toscano
1bfdcc8834 Skip message-body with HTTP 304 responses and mod_proxy_fcgi with no conn reuse.
Background: https://bz.apache.org/bugzilla/show_bug.cgi?id=59838

This commit should be an improvement for http://svn.apache.org/r1752347, in which
I tried to resolve a long standing issue with mod_proxy_fcgi: when a FCGI backend
returns a response that will become a HTTP 304, mod_proxy_fcgi forces a break
in the request processing ending up in reading the remaining bytes (for example
the message-body) and trying to intepret them as a FCGI header. This would cause
a error and a weird behavior:
1) HTTP 304 response flushed to the client correctly.
2) HTTP 503 logged in the access_log plus other bogus errors in the error_log.
I tried to separate the behavior when connection reuse is set or not, to eliminate
unnecessary latency in the latter case (which is the default).

I tested the change with and without connection reuse successfully, but feedback is
really welcome. If nobody will have anything against it I'll then proceed to update
my 2.4.x backport proposal.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754732 13f79535-47bb-0310-9956-ffa450edef68
2016-08-01 10:55:03 +00:00
Yann Ylavic
dba4e304b3 mod_proxy_wstunnel: we want to detect whether some response was sent to
the client when forwarding data from the backend to the client, not the
reverse.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754164 13f79535-47bb-0310-9956-ffa450edef68
2016-07-26 17:50:34 +00:00
Yann Ylavic
a3814e4cd2 mod_proxy_connect,wstunnel: log polling errors (and events) consistently at
level ERR (resp. TRACE2), and name the backend connection "backend" instead of
"sock".


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754161 13f79535-47bb-0310-9956-ffa450edef68
2016-07-26 17:37:18 +00:00
Yann Ylavic
73c941d869 mod_proxy_http: ping retry only if full 100-continue conditions are met.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1754159 13f79535-47bb-0310-9956-ffa450edef68
2016-07-26 17:16:18 +00:00
William A. Rowe Jr
2e2f089d45 Permit mod_proxy_hcheck.c to compile on Win32 32-bit architectures.
This decoration is required for all apr_thread fn() entry points,
at least on some platforms.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1753777 13f79535-47bb-0310-9956-ffa450edef68
2016-07-22 12:28:54 +00:00
Ruediger Pluem
af9775ba47 * Prevent redirect loops between workers within a balancer by limiting the
number of redirects to the number balancer members.

PR: 59864


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1753594 13f79535-47bb-0310-9956-ffa450edef68
2016-07-20 18:32:14 +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
352fdd5ab2 Unclear whether fdpass is common enough to justify a 'most' configuration,
but for the time being, assign it -something- for a build priority.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1753224 13f79535-47bb-0310-9956-ffa450edef68
2016-07-18 13:43:08 +00:00
Luca Toscano
3655cf4b8d mod_proxy_fcgi: avoid loops serving proxied error documents
This commit should solve the issue indicated in PR 55415.
Httpd loops while serving a error document if:
1) The error document's content is proxied.
2) ProxyErrorOverride is set.
The solution proposed is to limit the use of ap_die only
to the initial request. I tested the change with very basic
scenarios but I am not sure if I got all the use cases,
feedback is really welcome.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1753167 13f79535-47bb-0310-9956-ffa450edef68
2016-07-18 08:02:23 +00:00
Luca Toscano
d3c4feb149 Force mod_proxy_fcgi to read the whole FCGI response
even when the content has not been modified (HTTP 304).

The problem is described in PR 59838. This patch should 
avoid bogus reads causing the following issues with
HTTP 304 responses:
- AH01068: Got bogus version X, expected 1
- AH01069: Got bogus rid X, expected 1
- AH01075: Error dispatching request to :
- HTTP 503 logged instead of 304 (even if the external 
  client gets correctly a 304)

As discussed on IRC the HTTP_PRECONDITION_FAILED use case
should be handled like the HTTP_NOT_MODIFIED one but it will
be done in a separate commit.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1752347 13f79535-47bb-0310-9956-ffa450edef68
2016-07-12 21:13:37 +00:00
Eric Covener
f18a7a4e9b PR59815: rewrite per-directory + fcgi broken in 2.4.23
remove the query string from r->filename before calculating environment
(SCRIPT_FILENAME) in mod_proxy_fcgi.  Before PR59618, php-fpm would
see proxy:fcgi:// and do some of this same stripping.





git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1751970 13f79535-47bb-0310-9956-ffa450edef68
2016-07-08 21:49:47 +00:00
Yann Ylavic
5d0c0114fd mod_proxy: follow up to r1750392 and r1750474.
Restore PROXY_WORKER_IS_USABLE() check in ap_proxy_connect_backend(), we must
obviously (un)put backend in error state based on the result of the actual
connect(), and don't change it in ap_proxy_check_backend()...
APR_SUCCESS return by ap_proxy_check_backend(), i.e. a usable worker and an
established connection, is enough for modules to continue w/o calling
ap_proxy_connect_backend(), still.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750508 13f79535-47bb-0310-9956-ffa450edef68
2016-06-28 13:48:44 +00:00
William A. Rowe Jr
fe53079809 Fix proxy balancer lbmethod --enable defaults to follow proxy_balancer
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750507 13f79535-47bb-0310-9956-ffa450edef68
2016-06-28 13:44:58 +00:00
Yann Ylavic
f8cf275514 mod_proxy: follow up to r1750392: comment on proxy_conn_rec->tmp_bb.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750494 13f79535-47bb-0310-9956-ffa450edef68
2016-06-28 12:10:34 +00:00
Yann Ylavic
26faec4940 mod_proxy: follow up to r1750392.
Avoid double checking the connection in ap_proxy_connect_backend() when
ap_proxy_check_backend() says it is up and good to go.

This can be done by moving the PROXY_WORKER_IS_USABLE() check in
ap_proxy_check_backend(), since it is called by ap_proxy_connect_backend(),
and not calling the latter if the former succeeded (for the modules using it).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750474 13f79535-47bb-0310-9956-ffa450edef68
2016-06-28 11:19:36 +00:00
William A. Rowe Jr
31b6d84c9e Undo r1750418, miscommitted a local test
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750419 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 22:05:31 +00:00
William A. Rowe Jr
55a500ebaa This isn't C ;) Colon for noop
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750418 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 22:04:13 +00:00
Yann Ylavic
b031a1ffed mod_proxy: we don't need ap_proxy_ssl_connection_cleanup() anymore with
ap_proxy_check_backend() used at connection reuse time, so remove its last call and deprecate it.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750416 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 21:49:15 +00:00
Yann Ylavic
bc73d63b45 mod_proxy: use proxy_conn_rec->tmp_bb where appopriate to avoid temporary
brigade create/destroy.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750412 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 21:39:53 +00:00
Yann Ylavic
d4aa6476b2 mod_proxy_{http,ajp,fcgi}}: don't reuse backend connections with data available
before the request is sent.  PR 57832.

ap_proxy_check_backend() can be used before ap_proxy_connect_backend() to try
to read available data (including from the filters), and is called by
ap_proxy_connect_backend() to check the socket state only (as before, still
relevant after ap_proxy_check_backend() due to filter data which may not have
triggered a real socket operation).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750392 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 17:26:12 +00:00
Yann Ylavic
4ddbed1baf mod_proxy: revert r1750301, r1750305 and r1750311.
Rework needed.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1750376 13f79535-47bb-0310-9956-ffa450edef68
2016-06-27 16:06:42 +00:00