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

108 Commits

Author SHA1 Message Date
Christophe Jaillet
800af53861 Remove a space to synch with 2.4.x.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1793314 13f79535-47bb-0310-9956-ffa450edef68
2017-05-01 11:58:37 +00:00
Eric Covener
3555d2d597 drop the longhand version
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1788040 13f79535-47bb-0310-9956-ffa450edef68
2017-03-22 00:00:30 +00:00
Yann Ylavic
b24e686f57 Follow up to r1780327 and r1780329: mute update-log-tags.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783767 13f79535-47bb-0310-9956-ffa450edef68
2017-02-20 14:08:27 +00:00
Jacob Champion
2c70ed7562 ProxyFCGISetEnvIf: reject invalid invocations, streamline unsets
Neither of the following makes sense:
- ProxyFCGISetEnvIf cond !VARIABLE value
- ProxyFCGISetEnvIf cond !

Error out in these cases. Also, don't execute the (unused) replacement
expression when unsetting.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782532 13f79535-47bb-0310-9956-ffa450edef68
2017-02-10 21:31:13 +00:00
Eric Covener
94167768e7 support unsetting vars
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782482 13f79535-47bb-0310-9956-ffa450edef68
2017-02-10 15:25:25 +00:00
Jacob Champion
457a723537 mod_proxy_fcgi: allow setting empty variables in ProxyFCGISetEnvIf
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782419 13f79535-47bb-0310-9956-ffa450edef68
2017-02-09 23:59:15 +00:00
Jacob Champion
e5aac6970e mod_proxy_fcgi: fix spelling in APLOG_INFO message
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782418 13f79535-47bb-0310-9956-ffa450edef68
2017-02-09 23:59:14 +00:00
Jim Jagielski
54cb64ca1b Allow final admin-level fine-tuning
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782323 13f79535-47bb-0310-9956-ffa450edef68
2017-02-09 12:58:35 +00:00
Jim Jagielski
7635969d8d Remove trailing whitespace : no functional change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782193 13f79535-47bb-0310-9956-ffa450edef68
2017-02-08 14:53:05 +00:00
Yann Ylavic
bcb2cebac8 Follow up to r1782164: fix typo (closing double-quote).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782166 13f79535-47bb-0310-9956-ffa450edef68
2017-02-08 13:33:13 +00:00
Jim Jagielski
2eef117666 Logging update
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782164 13f79535-47bb-0310-9956-ffa450edef68
2017-02-08 13:23:36 +00:00
Eric Covener
8c772d56ee add ProxyFCGISetEnvIf
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1781329 13f79535-47bb-0310-9956-ffa450edef68
2017-02-01 23:07:53 +00:00
Jim Jagielski
456d07fce5 debugging
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1780329 13f79535-47bb-0310-9956-ffa450edef68
2017-01-26 03:52:35 +00:00
Jim Jagielski
0b1a529705 Adjust as needed
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1780328 13f79535-47bb-0310-9956-ffa450edef68
2017-01-26 03:52:34 +00:00
Jim Jagielski
232be9a3b1 debug
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1780327 13f79535-47bb-0310-9956-ffa450edef68
2017-01-26 03:52:31 +00:00
Christophe Jaillet
78d4351137 Follow-up to r1778350
Remove useless tests in order to avoid the duplication of a message.
Be consistent with "FPM" vs "PHP-FPM" usage messages.
Fix style issues.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1778500 13f79535-47bb-0310-9956-ffa450edef68
2017-01-13 07:22:29 +00:00
Eric Covener
728cb09d13 PR60576: php-fpm broken w/ per-dir rewrites
Attempt to dig out of well-meaning fixes for generic fcgi backends
that negatively affected some FPM configs.

Adds ProxyFCGIBackendType 


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1778350 13f79535-47bb-0310-9956-ffa450edef68
2017-01-11 20:58:33 +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
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
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
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
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
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
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
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
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
Eric Covener
1b594119fd Strip proxy:fcgi:// just like proxy:balancer
Submitted By: Jacob Champion <champion.pxi gmail.com>
Committed By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1747810 13f79535-47bb-0310-9956-ffa450edef68
2016-06-10 22:53:07 +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
Christophe Jaillet
a3479f987f Avoid memory allocation before making sure that this handler can handle the URL
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1744458 13f79535-47bb-0310-9956-ffa450edef68
2016-05-18 21:41:02 +00:00
Christophe Jaillet
a5cd346481 Fix typo in comment
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726059 13f79535-47bb-0310-9956-ffa450edef68
2016-01-21 18:45:24 +00:00
Eric Covener
33a5f0556a *) mod_proxy_fcgi: Suppress HTTP error 503 and message 01075,
"Error dispatching request", when the cause appears to be 
     the client closing the connection. 

PR58118.  

Submitted By: Tobias Adolph <adolph lrz.de>
Committed By: covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1724857 13f79535-47bb-0310-9956-ffa450edef68
2016-01-15 16:49:36 +00:00
Yann Ylavic
6f8a850766 Follow up to r1715880: revert abusive ap_casecmpstr[n]() usages.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1716151 13f79535-47bb-0310-9956-ffa450edef68
2015-11-24 14:38:54 +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
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
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