summaryrefslogtreecommitdiffstats
path: root/modules/proxy/mod_proxy_fcgi.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* mod_proxy_fggi: Follow up to r1919547: Accurate dirwalk for ↵Yann Ylavic2024-10-101-14/+50
| | | | | | | | | | | proxy-fcgi-pathinfo=full Use the proxied uri-path, and try to resolve the script's path first without then with the DocumentRoot prefix. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921238 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy_fgci: Follow up to r1919628: Simplify.Yann Ylavic2024-10-101-6/+6
| | | | | | | | Variable from_handler is used once so axe it. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1921237 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1919620: Restore r->filename re-encoding for ProxyPass URLs.Yann Ylavic2024-08-021-13/+35
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1919628 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1919620: init path after "proxy:" is skipped.Yann Ylavic2024-08-011-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1919623 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy_fcgi: Don't re-encode SCRIPT_FILENAME. PR 69203Yann Ylavic2024-08-011-24/+14
| | | | | | | | | | | | | | | | | | | Before r1918550 (r1918559 in 2.4.60), "SetHandler proxy:..." configurations did not pass through proxy_fixup() hence the proxy_canon_handler hooks, leaving fcgi's SCRIPT_FILENAME environment variable (from r->filename) decoded, or more exactly not re-encoded. We still want to call ap_proxy_canon_url() for "fcgi:" to handle/strip the UDS "unix:" case and check that r->filename is valid and contains no controls, but proxy_fcgi_canon() will not ap_proxy_canonenc_ex() thus re-encode anymore. Note that this will do the same for "ProxyPass fcgi:...", there is no reason that using SetHandler or ProxyPass don't result in the same thing. If an opt in/out makes sense we should probably look at ProxyFCGIBackendType. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1919620 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy_fcgi: Use r->uri rather than r->filename for directory walk.Yann Ylavic2024-07-271-5/+5
| | | | | | | | | | | r->filename is a "proxy:" one for mod_proxy modules, and ap_directory_walk() can't cope with that, so force r->uri. Github: closes #468 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1919547 13f79535-47bb-0310-9956-ffa450edef68
* * modules/proxy/mod_proxy_fcgi.c (dispatch): Only allocate a heapJoe Orton2024-05-081-1/+5
| | | | | | | | buffer if the configured size is greater than the stack-allocated buffer. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1917576 13f79535-47bb-0310-9956-ffa450edef68
* let httpd handle CL/TE for non-http handlersEric Covener2024-04-031-0/+9
| | | | | | | | Submitted By: ylavic, covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1916769 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy: Check for space/ctrls in nocanon path/urls before forwarding.Yann Ylavic2023-03-311-2/+13
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908827 13f79535-47bb-0310-9956-ffa450edef68
* * Whitespace fixes. No functional change.Ruediger Pluem2023-03-221-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908628 13f79535-47bb-0310-9956-ffa450edef68
* Do not double encode encoded slashesRuediger Pluem2023-03-131-2/+5
| | | | | | | | | | | | | | | | | | | | | In case that AllowEncodedSlashes is set to NoDecode do not double encode encoded slashes in the URL sent by the reverse proxy to the backend. * include/ap_mmn.h: Document the addition of ap_proxy_canonenc_ex to the API. * modules/proxy/mod_proxy.h: Declare ap_proxy_canonenc_ex and define flag values. * modules/proxy/proxy_util.c: Implement ap_proxy_canonenc_ex by modifying ap_proxy_canonenc accordingly and reimplement ap_proxy_canonenc to use ap_proxy_canonenc_ex with the appropriate flag. * modules/http2/mod_proxy_http2.c, modules/proxy/mod_proxy_*.c: Set the correct flag based on the AllowEncodedSlashes configuration and use ap_proxy_canonenc_ex instead of ap_proxy_canonenc. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908341 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy: Don't decode r->uri and reencode in r->filename for mapping=encoded.Yann Ylavic2023-03-021-2/+3
| | | | | | | | | | | | | | | | | | | Decoding was not done for mapping=servlet only (a subset), but overlooked for mapping=encoded. To avoid double-encoding in the canon_handler hook, use a new "proxy-noencode" (similarly to "proxy-nocanon") entry in r->notes. * proxy/mod_proxy.c(ap_proxy_trans_match): Set "proxy-noencode" in r->notes for PROXYPASS_MAP_ENCODED, and return DONE to avoid decoding in ap_process_request_internal(). * proxy/mod_proxy_http.c, proxy/mod_proxy_ajp.c, proxy/mod_proxy_wstunnel.c, proxy/mod_proxy_fcgi.c, proxy/mod_proxy_ajp.c, http2/mod_proxy_http2.c: Don't process the url through ap_proxy_canonenc() in canon_handler if "proxy-noencode" is set. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907972 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy_fcgi: follow up to r1884068 and r1884069.Yann Ylavic2020-12-031-6/+11
| | | | | | | No mixed Transfer-Encoding and Content-Length possible. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1884070 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy_fcgi: follow up to r1884068.Yann Ylavic2020-12-031-34/+83
| | | | | | | | Use the same heuristic as mod_proxy_http to determinine whether we need to spool the request body. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1884069 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy_fcgi: Honor "SetEnv proxy-sendcl".Yann Ylavic2020-12-031-7/+72
| | | | | | | | | | | | | When proxy-sendcl is set, spool the request body to memory/disk so that a Content-Length can be computed and provided to the backend. If not set, still try to prefetch the body in non blocking mode, which allows to handle small bodies (< 16K) the same way by default. PR 57087. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1884068 13f79535-47bb-0310-9956-ffa450edef68
* lognosEric Covener2020-05-161-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877830 13f79535-47bb-0310-9956-ffa450edef68
* PR 64365: proxy_fcgi doesn't check expression before unsetting varEric Covener2020-05-161-6/+17
| | | | | | | | | Submitted By: Michael König <mail ikoenig.net> Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1877829 13f79535-47bb-0310-9956-ffa450edef68
* Add missing pool tags to help debugging.Yann Ylavic2020-04-161-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876599 13f79535-47bb-0310-9956-ffa450edef68
* PR63628: individual status codes for ProxyErrorOverride.Eric Covener2020-04-111-2/+1
| | | | | | | | | | | Support specifying the http status codes to be considered by ProxyErrorOverride Submitted By: Martin Drößler <mail martindroessler.de> Committed By: covener git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876404 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy_fcgi: prioritize the check for mayflush when using flushpacketsLuca Toscano2018-02-111-4/+4
| | | | | | | | | | | The mayflush variable should be checked before the rest to avoid polling when not needed. Suggested by Yann Ylavic on the dev@ mailing list. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1823886 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy_fcgi: follow up to r1807876.Yann Ylavic2017-09-111-1/+1
| | | | | | | | Fix mixed declarations and code [-Wdeclaration-after-statement]. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1808014 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy_fcgi: limit the flush buckets inserted when flushpackets=on|autoLuca Toscano2017-09-091-4/+8
| | | | | | | | | | This commit is a follow up of r1802040 based on Jacob's feedback, namely inserting the FLUSH buckets only when really needed and useful, not always. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807876 13f79535-47bb-0310-9956-ffa450edef68
* Fix a compilation warning introduced by r1802040.Christophe Jaillet2017-08-191-1/+1
| | | | | | | | mod_proxy_fcgi.c:893:19: warning: ‘flushpoll’ may be used uninitialized in this function [-Wmaybe-uninitialized] This warning is a false positive. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1805490 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy_fcgi: Add the support for mod_proxy'sLuca Toscano2017-07-161-0/+22
| | | | | | | | | | | | | | | | flushpackets and flushwait params This change was requested on the development mailing list in order to fill another gap between mod_fcgi and mod_proxy_fcgi, namely the -flush funtionality. The more evolved core trunk code would not need this feature becuse of the non-blocking writes, but it is be needed in 2.4.x. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1802040 13f79535-47bb-0310-9956-ffa450edef68
* proxy_fcgi: remove FPM-specific logicJacob Champion2017-06-291-32/+0
| | | | | | | | | | Reverts r1780328, r1780329, and their associated followups, which incorrectly manipulated SCRIPT_NAME by default. All proxy_fcgi.t regression tests now pass. PR: 61202 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1800306 13f79535-47bb-0310-9956-ffa450edef68
* whitespace and match 2.4.xEric Covener2017-06-051-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1797662 13f79535-47bb-0310-9956-ffa450edef68
* Remove a space to synch with 2.4.x.Christophe Jaillet2017-05-011-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1793314 13f79535-47bb-0310-9956-ffa450edef68
* drop the longhand versionEric Covener2017-03-221-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1788040 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1780327 and r1780329: mute update-log-tags.Yann Ylavic2017-02-201-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783767 13f79535-47bb-0310-9956-ffa450edef68
* ProxyFCGISetEnvIf: reject invalid invocations, streamline unsetsJacob Champion2017-02-101-16/+33
| | | | | | | | | | | 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
* support unsetting varsEric Covener2017-02-101-1/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782482 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy_fcgi: allow setting empty variables in ProxyFCGISetEnvIfJacob Champion2017-02-101-1/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782419 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy_fcgi: fix spelling in APLOG_INFO messageJacob Champion2017-02-101-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782418 13f79535-47bb-0310-9956-ffa450edef68
* Allow final admin-level fine-tuningJim Jagielski2017-02-091-1/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782323 13f79535-47bb-0310-9956-ffa450edef68
* Remove trailing whitespace : no functional changeJim Jagielski2017-02-081-47/+47
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782193 13f79535-47bb-0310-9956-ffa450edef68
* Follow up to r1782164: fix typo (closing double-quote).Yann Ylavic2017-02-081-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782166 13f79535-47bb-0310-9956-ffa450edef68
* Logging updateJim Jagielski2017-02-081-1/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1782164 13f79535-47bb-0310-9956-ffa450edef68
* add ProxyFCGISetEnvIfEric Covener2017-02-021-0/+80
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1781329 13f79535-47bb-0310-9956-ffa450edef68
* debuggingJim Jagielski2017-01-261-0/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1780329 13f79535-47bb-0310-9956-ffa450edef68
* Adjust as neededJim Jagielski2017-01-261-0/+20
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1780328 13f79535-47bb-0310-9956-ffa450edef68
* debugJim Jagielski2017-01-261-0/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1780327 13f79535-47bb-0310-9956-ffa450edef68
* Follow-up to r1778350Christophe Jaillet2017-01-131-10/+5
| | | | | | | | 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
* PR60576: php-fpm broken w/ per-dir rewritesEric Covener2017-01-111-11/+88
| | | | | | | | | | 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
* Return HTTP 504 rather than 503 when a proxy timeout is hit.Luca Toscano2016-12-231-0/+3
| | | | | | | | 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
* Fix stupid mistake introduced in r1759984Luca Toscano2016-09-091-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1760018 13f79535-47bb-0310-9956-ffa450edef68
* mod_proxy_fcgi: handle the HTTP 412 use caseLuca Toscano2016-09-091-4/+8
| | | | | | | | | | | | | 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
* mod_proxy_fcgi: revert r1756187.Yann Ylavic2016-08-221-0/+10
| | | | | | | | | | 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
* mod_proxy_fcgi: forcing proxy_conn->close here is useless, same is doneYann Ylavic2016-08-121-10/+0
| | | | | | | | | | 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
* [mod_proxy_]http: follow up to r1750392.Yann Ylavic2016-08-121-4/+4
| | | | | | | | | 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
* Revert r1756064 and r1756060 until fixed (tests framework passes).Yann Ylavic2016-08-121-14/+14
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1756065 13f79535-47bb-0310-9956-ffa450edef68