1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

27 Commits

Author SHA1 Message Date
Eric Covener
61645eaac8 let httpd handle CL/TE for non-http handlers
Submitted By: ylavic, covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1916769 13f79535-47bb-0310-9956-ffa450edef68
2024-04-03 11:49:53 +00:00
Joe Orton
3703f02db7 * modules/proxy/mod_proxy_scgi.c: Mark global variables as static and
pointers as const. (no functional change)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1915874 13f79535-47bb-0310-9956-ffa450edef68
2024-02-19 10:45:36 +00:00
Ruediger Pluem
6e75fe3b52 * Whitespace fixes. No functional change.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908628 13f79535-47bb-0310-9956-ffa450edef68
2023-03-22 08:01:31 +00:00
Ruediger Pluem
2fa15c2c06 Do not double encode encoded slashes
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
2023-03-13 10:24:30 +00:00
Jim Jagielski
f8b13b7208 These need to be signed longs... cast as needed.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1839303 13f79535-47bb-0310-9956-ffa450edef68
2018-08-27 12:17:46 +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
88fb9f6068 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@1744459 13f79535-47bb-0310-9956-ffa450edef68
2016-05-18 21:46:42 +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
Jeff Trawick
c020c01865 mod_proxy_scgi: ProxySCGIInternalRedirect now allows an alternate
response header to be used by the application, for when the application
or framework is unable to return Location in the internal-redirect
form.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1674510 13f79535-47bb-0310-9956-ffa450edef68
2015-04-18 13:48:57 +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
Jeff Trawick
65341f92bc Follow-up to r1592529:
Define default port for "scgi" schemes (as chosen by
mod_proxy_scgi) in a common location.

Suggested by: jailletc36


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592615 13f79535-47bb-0310-9956-ffa450edef68
2014-05-05 19:26:33 +00:00
Jeff Trawick
dafc97aa81 mod_proxy_scgi: Support Unix sockets.
ap_proxy_port_of_scheme(): Support default SCGI port (4000).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1592529 13f79535-47bb-0310-9956-ffa450edef68
2014-05-05 14:02:48 +00:00
Rainer Jung
3073252a8f Partially revert r1203859: use a fixed string
per module as the proxy_function instead of
the macro __FUNCTION__ which is not C89.

There's no real loss of information, because all
of the calls are in the same scgi handler function.

All proxy modules apart form SCGI already use the
upper case scheme in the analogous calls.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1210124 13f79535-47bb-0310-9956-ffa450edef68
2011-12-04 15:16:45 +00:00
Stefan Fritsch
92e366007c Add lots of unique tags to error log messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209766 13f79535-47bb-0310-9956-ffa450edef68
2011-12-02 23:02:04 +00:00
Stefan Fritsch
8ec7f5c5bf great proxy logging cleanup:
* remove "proxy:", "FCGI", etc. prefixes and pid which are now
    included in the error log format

  * propagate frontend request's logconfig to backend request
    
  * use ap_log_rerror where possible
    
  * remove obsolete APLOG_NOERRNO


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1203859 13f79535-47bb-0310-9956-ffa450edef68
2011-11-18 21:41:09 +00:00
Stefan Fritsch
1951a037bf More cleanup: Expand tabs and some more indentation fixes
No functional change


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174929 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 18:08:42 +00:00
Jim Jagielski
427c85bd23 Cleanup effort in prep for GA push:
Trim trailing whitespace... no func change



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1174751 13f79535-47bb-0310-9956-ffa450edef68
2011-09-23 13:39:32 +00:00
Stefan Fritsch
beb3ea9c11 Add more (trace) logging to the ap_scan_script_header*() functions
Add ap_scan_script_header*_ex() functions that take a module index for
logging.
Make mod_cgi, mod_cgid, mod_proxy_fcgi, mod_proxy_scgi, mod_isapi use the
new functions.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147493 13f79535-47bb-0310-9956-ffa450edef68
2011-07-16 21:53:18 +00:00
Jim Jagielski
3da4ecd815 Add in proxy-scgi-pathinfo and proxy-fcgi-pathinfo envvars
to allow "best guess" calculation of PATH_INFO for backend
FCGI/SCGI servers

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1124979 13f79535-47bb-0310-9956-ffa450edef68
2011-05-19 15:58:15 +00:00
Jim Jagielski
2aef21903c Cleanup... most don't need apr_hooks.h at all...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1101067 13f79535-47bb-0310-9956-ffa450edef68
2011-05-09 15:36:32 +00:00
Jeff Trawick
0ce133f8a8 Intel's compiler warns about assigning the non-enum value 0 to the
enumeration apr_finfo_t.filetype, which is done when forgetting
the previously-derived file type

use the appropriate enum value APR_NOFILE instead

Also change comparisons of the field with 0 to use APR_NOFILE instead,
as is the practice of some existing code.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@983065 13f79535-47bb-0310-9956-ffa450edef68
2010-08-06 17:36:52 +00:00
Stefan Fritsch
ebb62867fb Use the new APLOG_USE_MODULE/AP_DECLARE_MODULE macros everywhere to take
advantage of per-module loglevels


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@951895 13f79535-47bb-0310-9956-ffa450edef68
2010-06-06 16:59:50 +00:00
William A. Rowe Jr
3e338e488c Elaborate on low hanging XXX fruit
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@885689 13f79535-47bb-0310-9956-ffa450edef68
2009-12-01 08:44:11 +00:00
André Malo
9fd72cdebd remove useless line
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@817066 13f79535-47bb-0310-9956-ffa450edef68
2009-09-20 17:57:05 +00:00
André Malo
6da5f085da add mod_proxy_scgi, as announced a long time ago
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@729538 13f79535-47bb-0310-9956-ffa450edef68
2008-12-26 21:41:48 +00:00