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

26 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
Yann Ylavic
2eceb6a9fe mod_proxy: Check for space/ctrls in nocanon path/urls before forwarding.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1908827 13f79535-47bb-0310-9956-ffa450edef68
2023-03-31 00:11:02 +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
Yann Ylavic
0df5879df8 mod_proxy_uwsgi: Stricter backend HTTP response parsing/validation
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907980 13f79535-47bb-0310-9956-ffa450edef68
2023-03-02 15:10:30 +00:00
Yann Ylavic
0933475904 mod_proxy_uwsgi: Honor "proxy-nocanon" and "proxy-noencode".
Just like the other proxy modules.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907976 13f79535-47bb-0310-9956-ffa450edef68
2023-03-02 14:40:38 +00:00
Yann Ylavic
fa7f375306 mod_proxy_uwsgi: Remove duplicate slashes at the beginning of PATH_INFO.
To accommodate for configs like:
    ProxyPass /uwsgi-pp uwsgi://localhost:8001/
which before r1892805 did not produce a leading double-slash in PATH_INFO.

Submitted by: rpluem



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1894074 13f79535-47bb-0310-9956-ffa450edef68
2021-10-09 15:22:00 +00:00
Yann Ylavic
b44b9b6b2a mod_proxy: Handle ap_proxy_buckets_lifetime_transform() errors.
* modules/proxy/mod_proxy.h,modules/proxy/proxy_util.c:
  Add ap_proxy_fill_error_brigade() to factorize proxy error handling
  on the client connection side.

* modules/proxy/mod_proxy_{http,ajp,uwsgi}.c:
  Use ap_proxy_fill_error_brigade() where needed, including when an
  empty brigade is returned on the backend side or when calling
  ap_proxy_buckets_lifetime_transform fails.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1893595 13f79535-47bb-0310-9956-ffa450edef68
2021-09-24 11:25:42 +00:00
Yann Ylavic
b364cad72b mod_proxy_uwsgi: Fix PATH_INFO setting for generic worker.
When the generic "proxy:reverse" worker is selected for an uwsgi scheme, the
worker name is irrelevant so uwscgi_handler() should point to the PATH_INFO
directly from the given URL.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1892805 13f79535-47bb-0310-9956-ffa450edef68
2021-09-02 09:53:43 +00:00
Yann Ylavic
c82fb455e3 Follow up to r1880205, APLOGNO().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1880214 13f79535-47bb-0310-9956-ffa450edef68
2020-07-23 15:29:12 +00:00
Yann Ylavic
fb08e475bf mod_proxy_uwsgi: Error out on HTTP header larger than 16K
The uwsgi protocol does not let us serialize more than 16K of HTTP header,
so fail early with 500 if it happens.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1880205 13f79535-47bb-0310-9956-ffa450edef68
2020-07-23 14:09:50 +00:00
Ruediger Pluem
57df7f972e Avoid NULL pointer dereferences for empty environment variable values
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879878 13f79535-47bb-0310-9956-ffa450edef68
2020-07-15 08:24:13 +00:00
Yann Ylavic
f461bcf12c Add missing pool tags to help debugging.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1876599 13f79535-47bb-0310-9956-ffa450edef68
2020-04-16 12:32:33 +00:00
Eric Covener
a545608f83 PR63628: individual status codes for ProxyErrorOverride.
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
2020-04-11 21:19:08 +00:00
Yann Ylavic
975f5e1095 Follow up to r1859371: extend to other ap_proxy_connection_create[_ex]() users.
This function now now handles SSL reuse as well as the "proxy-request-hostname"
note (SNI), so let's also call it unconditionnaly in all proxy modules.

On the mod_ssl side, since this note has the lifetime of the connection, don't
reset/unset it during handshake (ssl_io_filter_handshake).


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1859422 13f79535-47bb-0310-9956-ffa450edef68
2019-05-17 08:42:17 +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
Yann Ylavic
fab86dcf0e Axe ap_rgetline_core(), not used anymore.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1829790 13f79535-47bb-0310-9956-ffa450edef68
2018-04-22 15:58:18 +00:00
Jim Jagielski
23421a3857 APR-ize uint types
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1818280 13f79535-47bb-0310-9956-ffa450edef68
2017-12-15 12:23:13 +00:00
Jim Jagielski
23394f444c Use APR type
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1818013 13f79535-47bb-0310-9956-ffa450edef68
2017-12-13 13:32:49 +00:00
Christophe Jaillet
833a2c15b0 Add APLOGNO to error messages
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1816922 13f79535-47bb-0310-9956-ffa450edef68
2017-12-01 22:15:24 +00:00
Christophe Jaillet
a6a14bb3e8 Some small optimization:
- use 'ap_cstr_casecmpn' instead of 'strncasecmp'
   - use 'apr_table_setn' when parameters are constant
   - avoid some memory allocation if the module can not handle a request

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1816919 13f79535-47bb-0310-9956-ffa450edef68
2017-12-01 22:06:33 +00:00
Jim Jagielski
e2848831fe More C90 stuff...
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1810447 13f79535-47bb-0310-9956-ffa450edef68
2017-10-02 15:28:42 +00:00
Jim Jagielski
78ae561712 Final comment-format changes
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1810365 13f79535-47bb-0310-9956-ffa450edef68
2017-10-02 14:39:56 +00:00
Jim Jagielski
7a6038c97e And standard format - no functional change
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1810363 13f79535-47bb-0310-9956-ffa450edef68
2017-10-02 14:36:42 +00:00
Jim Jagielski
33dc920f47 C changes / C90/C89
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1810362 13f79535-47bb-0310-9956-ffa450edef68
2017-10-02 14:35:33 +00:00
Jim Jagielski
da54e90dda Fold in ALv2 licensed UWSGI proxy (sub)module as acknowledged via
https://github.com/unbit/uwsgi/issues/1636



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1810358 13f79535-47bb-0310-9956-ffa450edef68
2017-10-02 14:20:15 +00:00