mod_proxy_fcgi.c

Checkout Tools
  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 1788445 is being indexed.

Merge r1780328, r1780329, r1781329, r1782164, r1782166, r1782193, r1778350, r1781329, r1782194, r1782323, r1782418, r1782419, r1782482, r1782532, r1788040 from trunk:

Adjust as needed

debugging

add ProxyFCGISetEnvIf

Logging update

Follow up to r1782164: fix typo (closing double-quote).

Remove trailing whitespace : no functional change

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

add ProxyFCGISetEnvIf

trailing whitespace

Allow final admin-level fine-tuning

mod_proxy_fcgi: fix spelling in APLOG_INFO message

mod_proxy_fcgi: allow setting empty variables in ProxyFCGISetEnvIf

support unsetting vars

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.

drop the longhand version

Submitted by: jim, covener, jim, ylavic, jim, covener, covener, jim, jim, jchampion, jchampion, covener, jchampion, covener

Reviewed by: jim, covener, jchampion

  1. … 7 more files in changeset.
Merge r1775858 from trunk:

Return HTTP 504 rather than 503 when a proxy timeout is hit.

Part of the review for PR: 56188

Submitted by: elukey

Reviewed by: elukey, jim, wrowe

  1. … 3 more files in changeset.
remove trailing whitespace: no functional change

Merge of r1750392,r1750412,r1750416,r1750474,r1750494,r1750508 from trunk:

mod_proxy_{http,ajp,fcgi}: don't reuse backend connections with data

available before the request is sent. PR 57832.

  1. … 8 more files in changeset.
Merge r1759984, r1760018 from trunk:

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.

Fix stupid mistake introduced in r1759984

Submitted by: elukey

Reviewed/backported by: jim

  1. … 2 more files in changeset.
Merge r1753167 from trunk:

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.

Submitted by: elukey

Reviewed/backported by: jim

  1. … 3 more files in changeset.
Merge r1752347 from trunk:

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.

Submitted by: elukey

Reviewed/backported by: jim

  1. … 3 more files in changeset.
Merge r1751970 from trunk:

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.

Submitted by: covener

Reviewed/backported by: jim

  1. … 3 more files in changeset.
mod_proxy_fcgi: Avoid passing a filename of proxy:fcgi:// as

SCRIPT_FILENAME to a FastCGI server. PR59618.

  1. … 2 more files in changeset.
Merge r1744458, r1744459 from trunk:

Avoid memory allocation before making sure that this handler can handle the URL

Avoid memory allocation before making sure that this handler can handle the URL

Submitted by: jailletc36

Reviewed/backported by: jim

  1. … 3 more files in changeset.
Fix typo in comment
Merge r1724857 from trunk:

*) 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

Submitted by: covener

Reviewed/backported by: jim

  1. … 3 more files in changeset.
core, modules: Avoid error response/document handling by the core if some

handler or input filter already did it while reading the request (causing

a double response body).

Submitted by: ylavic

Backports: r1482522 (partial, ap_map_http_request_error() things only!),

r1529988, r1529991, r1643537, r1643543, r1657897, r1665625,

r1665721, r1674056

Reviewed by: ylavic, minfrin, wrowe

  1. … 26 more files in changeset.
mod_proxy_http: Use the "Connection: close" header for requests to

backends not recycling connections (disablereuse), including the default

reverse and forward proxies.

Submitted by: ylavic (and trawick for an old helper function)

Reviewed by: rjung, covener

  1. … 7 more files in changeset.
Merge r1611979, r1611725, r1588448, r1642803, r1657949, r1451108 (part of it),

r1643672, r1496178 from trunk

* Synch with trunk:

- Add missing APLOGNO.

- mod_deflate: don't require <limits.h> by using APR_INT32_MAX instead of INT_MAX.

- Move two variable assignments off the fast path.

- Fix curly braces style. Remove useless empty lines

- tab vs space

- Removed tabs.

- dump fcgi headers with trace8 instead of debug+compile-time flag.

- Drop severity of "LDAP: Setting referrals to ON" from DEBUG to TRACE4

Submitted by: jailletc36, ylavic, minfrin, fuankg, covener

Reviewed by: jailletc36, minfrin, ylavic

Backported by: jailletc36

  1. … 12 more files in changeset.
Fix typo already fixed in trunk (missing part of r1648557 ; the other fixes have been done in r1648559)
Merge r1647035 from trunk:

provide alternative PATH_INFO calculation options for proxy_fcgi.

PR 55329

  1. … 3 more files in changeset.
Merge the following revisions from trunk:

trunk patch: http://svn.apache.org/r1588544 (rewrite+UDS)

http://svn.apache.org/r1641636 ('using default worker' msg tweak)

http://svn.apache.org/r1647005 (tcp reuse)

http://svn.apache.org/r1647009 (uds reuse)

http://svn.apache.org/r1647334 (uds reuse fix)

+ 1 additional de_socketfy call in mod_proxy

  1. … 9 more files in changeset.
Merge r1646724, r1650309 from trunk:

tweak SCRIPT_FILENAME passed to fastcgi backends when a balancer is used.

save some bytes per Christophe's review.

  1. … 1 more file in changeset.
Merge r1640495, r1644031 from trunk

* mod_proxy_fcgi: Ignore body data from backend for 304 responses. PR 57198.

Submitted by: jkaluza

Reviewed by: jkaluza, ylavic, covener

Backported by: jailletc36

  1. … 2 more files in changeset.
Fix comment errors in mod_proxy_fcgi.
Merge r1640040, r1640042 from trunk:

mod_proxy_fcgi, mod_authnz_fcgi: stop reading the response and issue an error

when parsing or forwarding the response fails.

Follow up to r1640040: CHANGES entry.

Submitted by: ylavic

Reviewed/backported by: jim

  1. … 4 more files in changeset.
Merge r1640036, r1640331 from trunk:

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'.

Submitted by: ylavic, trawick

Reviewed by: ylavic, trawick, mrumph

  1. … 3 more files in changeset.
Merge r1611978, r1612068 from trunk:

Add missing APLOGNO.

Refactor to keep APLOGNO on the same line as ap_log_error, when applicable.

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.

Submitted by: jailletc36

Reviewed/backported by: jim

  1. … 18 more files in changeset.
Merge r1618401 from trunk:

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

Submitted by: trawick

Reviewed/backported by: jim

  1. … 3 more files in changeset.
Merge r1592037 from trunk:

mod_proxy_fcgi: Fix occasional high CPU when handling request bodies.

Submitted by: trawick

Reviewed by: covener, ylavic

  1. … 3 more files in changeset.
merge 1592032 from trunk:

mod_proxy_fcgi: better error messages, and fix an old bug where the error

condition was forgotten

Submitted by: trawick

Reviewed by: ylavic, covener

  1. … 2 more files in changeset.
Merge r1603027, r1603029, r1603122 from trunk:

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.

Reindent after small fix in r1603027

mod_proxy_fcgi: follow up to r1592032.

Also break the outer loop when "sending stdin" fails.

Submitted by: trawick, ylavic

Reviewed/backported by: jim

  1. … 2 more files in changeset.
merge r1591508 from trunk:

mod_proxy_fcgi: Support iobuffersize parameter.

Submitted by: trawick

Reviewed by: jim, ylavic

  1. … 3 more files in changeset.
Merge r1591472 from trunk:

mod_proxy_fcgi: remove wasted memset() calls and other historical bits

Submitted by: trawick

Reviewed by: jim, ylavic

  1. … 2 more files in changeset.