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

1830 Commits

Author SHA1 Message Date
Eric Covener
7c32a06bc5 Merge r1938690 from trunk:
drop hop-by-hop headers from UWSGI

Submitted By: Maya Echtinaw




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1938691 13f79535-47bb-0310-9956-ffa450edef68
2026-09-29 11:28:59 +00:00
Eric Covener
c0a3e5cbcb Merge r1938673 from trunk:
check PASV addresses



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1938674 13f79535-47bb-0310-9956-ffa450edef68
2026-09-29 08:38:27 +00:00
Eric Covener
d2c3595c22 Merge r1937678 from trunk:
[BUGZ 70192] - Health Check Mechanism Failure Causing 503 Errors and High CPU/Memory

Reviewed By: jim, jorton, covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1938606 13f79535-47bb-0310-9956-ffa450edef68
2026-09-28 12:29:06 +00:00
Joe Orton
48f9ad3f0b Merge r1937525, r1937527, r1937528 from trunk:
fix off-by-one in proxy_send_dir_filter

mod_lua: fix stack write past apr_size_t in r:parsebody

mod_proxy_http2: reserve NUL when rewriting a backend Link header uri

Submitted by: arshiya tabasum <arshi bugqore.com>
Reviewed by: covener, jim, jorton
GitHub: closes #718


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1938349 13f79535-47bb-0310-9956-ffa450edef68
2026-09-18 16:47:08 +00:00
Jim Jagielski
5b934373e3 https://github.com/apache/httpd/pull/703.patch
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1937719 13f79535-47bb-0310-9956-ffa450edef68
2026-09-01 10:27:29 +00:00
Jim Jagielski
f73841909c Merge r1934913 from trunk:
Use HTTP_* and ap_is_*() macros instead of literals
Submitted by: michaelo
Reviewed by: rjung, jim, jorton


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1935938 13f79535-47bb-0310-9956-ffa450edef68
2026-07-06 11:55:01 +00:00
Jim Jagielski
95e4ddaaa0 *) Constify static arrays of string constants.
trunk patch: https://svn.apache.org/r1933659


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1935817 13f79535-47bb-0310-9956-ffa450edef68
2026-07-02 19:54:30 +00:00
Eric Covener
f63f26aff6 Merge r1935016 from trunk:
restrict per-dir file funcs centrally

Reviewed By: covener, jorton, jfclere


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1935017 13f79535-47bb-0310-9956-ffa450edef68
2026-06-05 10:28:53 +00:00
Eric Covener
7d9f3cfb10 Merge r1935014 from trunk:
ap_regname: restrict to reasonable captures

Reviewed By: covener, gbechis, jfclere



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1935015 13f79535-47bb-0310-9956-ffa450edef68
2026-06-05 10:26:23 +00:00
Eric Covener
403269396d Merge r1935007 from trunk:
ap_proxy_cookie_revers: fix dup path/domain


Reviewed By: covener, jailletc36, jfclere


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1935008 13f79535-47bb-0310-9956-ffa450edef68
2026-06-05 10:07:34 +00:00
Eric Covener
414de374a0 Merge r1935003 from trunk:
fix iteration

Reviewed By:covener, jorton, jfclere, jailletc36


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1935004 13f79535-47bb-0310-9956-ffa450edef68
2026-06-05 10:01:52 +00:00
Joe Orton
04641bce75 Merge r1934981 from trunk:
* modules/proxy/mod_proxy_ftp.c (proxy_ftp_dir_filter): Use
  ap_os_escape_path() with ap_escape_html() instead of
  ap_escape_uri() for href attributes in generated directory
  listing links.

Reviewed by: jorton, covener, jfclere


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1934982 13f79535-47bb-0310-9956-ffa450edef68
2026-06-04 15:48:59 +00:00
Joe Orton
30a10027ab Merge r1887192 from trunk:
* modules/proxy/mod_proxy_balancer.c (balancer_display_page):
  Include nonce in XML output.

PR: 63074
Submitted by: Federico Mennite <federico.mennite lifeware.ch>
Reviewed by: jorton, rpluem, covener
Github: closes #587


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1933634 13f79535-47bb-0310-9956-ffa450edef68
2026-05-01 08:53:13 +00:00
Joe Orton
a0ba5d0ed6 Merge r1929972, r1929973 from trunk:
mod_proxy_hcheck: Fix healthcheck disabled due to child restart while updating

When a child gets restarted while the healthcheck watchdog running for a
worker, the healcheck will be disabled for that worker indefinitively because
its ->updated time remains zero. Fix all zero ->updated time at startup.

* mod_proxy_hcheck.c(hc_watchdog_callback):
  Have AP_WATCHDOG_STATE_STARTING set the ->updated time of all the workers to
  "now" (if zero).
  Move up scoped variables common to AP_WATCHDOG_STATE_{STARTING,RUNNING}
  loops.

Reported by: Lubos Uhliarik <luhliari redhat.com>

Follow up to r1929972: CHANGES entry.

Submitted by: ylavic
Reviewed by: ylavic, rpluem, jorton
Github: closes #581


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1933633 13f79535-47bb-0310-9956-ffa450edef68
2026-05-01 08:50:37 +00:00
Eric Covener
05e6c5086d Merge r1933349 from trunk:
use AP_EXPR_FLAG_RESTRICTED in htaccess



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1933350 13f79535-47bb-0310-9956-ffa450edef68
2026-04-26 16:00:28 +00:00
Eric Covener
d04119e6e5 Merge r1933347 from trunk:
fix ajp_msg_check_header check



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1933348 13f79535-47bb-0310-9956-ffa450edef68
2026-04-26 15:57:55 +00:00
Eric Covener
a3d3228831 Merge r1933344 from trunk:
fix ajp_parse_data message len check
+lognos



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1933346 13f79535-47bb-0310-9956-ffa450edef68
2026-04-26 15:55:26 +00:00
Eric Covener
b8def8fe32 Merge r1933342 from trunk:
fix ajp_msg_get_string buffer checks



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1933343 13f79535-47bb-0310-9956-ffa450edef68
2026-04-26 15:50:50 +00:00
Eric Covener
493eb23e5c Merge r1933340 from trunk:
fix length checks in  AJP msg_get functions



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1933341 13f79535-47bb-0310-9956-ffa450edef68
2026-04-26 15:48:41 +00:00
Ruediger Pluem
5b4ba1e8d5 Merge r1873397 from trunk:
PR62989: DOCTYPE tags in server-generated HTML.

Submitted By: Andra Farkas <deepbluemistake gmail.com>, Giovanni Bechis <giovanni paclan.it>
Reviewed by: rpluem, jorton, covener

Github: closes #553


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1929571 13f79535-47bb-0310-9956-ffa450edef68
2025-11-07 08:23:08 +00:00
Eric Covener
6189768ae9 port r1922115 from trunk
*) mod_proxy_ajp: Use iobuffersize set on worker level for the IO buffer
      size.

Submitted By: Jari Ahonen <jah@progress.com>
Reviewed By: rpluem, ylavic, covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1927029 13f79535-47bb-0310-9956-ffa450edef68
2025-07-07 11:33:13 +00:00
Yann Ylavic
7996ffc885 Merge r1912460, r1925743 from trunk:
mod_proxy: Consistently close the socket on failure to reuse the connection.

proxy_connection_create() and ap_proxy_connect_backend() sometimes close the
connection on failure, sometimes not. Always close it.


mod_proxy: restore reuse of ProxyRemote connections when possible.

Fixes a regression from 2.4.59 (r1913907).

For a reverse proxy setup with a worker (enablereuse=on) and a
forward/CONNECT ProxyRemote to reach it, an open connection/tunnel
to/through the remote proxy for the same origin server (and using the
same proxy auth) should be reusable. Avoid closing them like r1913534
did.

* modules/proxy/proxy_util.c:
  Rename the struct to remote_connect_info since it's only used for
  connecting through remote CONNECT proxies. Axe the use_http_connect
  field, always true.

* modules/proxy/proxy_util.c(ap_proxy_connection_reusable):
  Remote CONNECT (forward) proxy connections can be reused if the auth
  and origin server infos are the same, so conn->forward != NULL is not
  a condition to prevent reusability.

* modules/proxy/proxy_util.c(ap_proxy_determine_connection):
  Fix the checks around conn->forward reuse and connection cleanup if
  that's not possible.


Submitted by: jfclere, ylavic
Reviewed by: ylavic, jfclere, rpluem

Github: closes #532


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1926317 13f79535-47bb-0310-9956-ffa450edef68
2025-06-10 10:43:58 +00:00
Ruediger Pluem
f82a9e886f Merge r1925109 from trunk:
* Temporarily add back the query string to the URL as it might contain the
  routing information for sticky sessions.

PR: 69443

Reviewed by: rpluem, covener, ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1926107 13f79535-47bb-0310-9956-ffa450edef68
2025-06-04 07:36:11 +00:00
Jim Jagielski
c8c5aef865 *) Do not add a space before '|' when setting the value for stickysession in the
balancer manager as this breaks the stickysession configuration once a new
     configuration is submitted by the balancer manager. PR: 69510
     trunk patch: https://svn.apache.org/r1923101


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1923145 13f79535-47bb-0310-9956-ffa450edef68
2025-01-15 12:03:59 +00:00
Jim Jagielski
20f342311f *) mod_proxy_fcgi: Fix proxy-fcgi-pathinfo=full
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1922959 13f79535-47bb-0310-9956-ffa450edef68
2025-01-07 15:06:06 +00:00
Jim Jagielski
a2e4b0b123 *) mod_proxy: Honor parameters of ProxyPassMatch workers with substitution
in the host name or port. PR 69233.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1922958 13f79535-47bb-0310-9956-ffa450edef68
2025-01-07 15:05:35 +00:00
Jim Jagielski
83ab7e7e1c *) Easy patches: synch 2.4.x and trunk
- server: Use apr_size_t instead of int to harden against overflows
         - mod_http2: DOXYGEN has nothing to do here, just remove this
                      strange "#if defined(DOXYGEN)"
         - test: make the compiler happy when using --enable-maintainer-mode
         - mod_proxy: Fix format string type check
         - mod_http2: Fix comment, no functional change
         - <various>: Remove unnecessary APLOGNO() use in TRACE-level logging
         - mod_cache_socache: Update comment only, to remove reference to
                              session cache
         - mod_dav: Fix error message formatting if an unauthenticated user
                    tries to use an authenticated user's lock token
         - <none>: trigger ci
         - server: Fix typo in comment



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1922956 13f79535-47bb-0310-9956-ffa450edef68
2025-01-07 15:00:40 +00:00
Eric Covener
2aa446f5b0 Merge r1919620, r1919621, r1919623, r1919628, r1921237 from trunk:
mod_proxy_fcgi: Don't re-encode SCRIPT_FILENAME. PR 69203

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.



Follow up to r1919620: CHANGES entry indent.

Follow up to r1919620: init path after "proxy:" is skipped.

Follow up to r1919620: Restore r->filename re-encoding for ProxyPass URLs.



mod_proxy_fgci: Follow up to r1919628: Simplify.

Variable from_handler is used once so axe it.



Submitted by: ylavic
Reviewed by:   ylavic, covener, jorton

Github: closes #470


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1922080 13f79535-47bb-0310-9956-ffa450edef68
2024-11-25 13:32:44 +00:00
Ruediger Pluem
88ebfaa60d Merge r1838684, r1920570, r1920571, r1920572 from trunk:
When a rewrite to proxy is configured in the server config, a check is made to make sure mod_proxy is active.  But the same is not done if a rewrite to proxy is configured in an .htaccess file. 

Basically this patch is the block of code from hook_uri2file that does the proxy check, copied to hook_fixup.

Patch provided by Michael Streeter [mstreeter1 gmail.com], slightly modified to use a new APLOGNO
PR 56264


mod_rewrite, mod_proxy: mod_proxy to cononicalize rewritten [P] URLs. PR 69235.

When mod_rewrite sets a "proxy:" URL with [P], it should be canonicalized by
mod_proxy still, notably to handle any "unix:" local socket part.

To avoid double encoding in perdir context, a follow up commit should remove the
ap_escape_uri() done in mod_rewrite since it's now on mod_proxy to canonicalize,
per PR 69260.



* Leave the proper escaping of the URL and the adding of r->args to the
  proxy module which runs after us after r1920570.
  Just take care to add r->args in case the proxy rule has the
  [NE] flag set and tell the proxy module to not escape in this case.


* Mention the additional bug

Submitted by: jailletc36, ylavic, rpluem
Reviewed by: rpluem, ylavic, covener

Github: closes #484


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1921299 13f79535-47bb-0310-9956-ffa450edef68
2024-10-14 06:56:45 +00:00
Eric Covener
5f82765bc6 Merge r1427465, r1918823 from trunk:
Remove support for Request-Range header sent by Navigator 2-3 and
MSIE 3


* Follow up to r1918814: Strings are from configuration and thus trusted

Submitted by: sf, rpluem
Reviewed by: rpluem, covener, jorton

Github: closes #475


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1920981 13f79535-47bb-0310-9956-ffa450edef68
2024-09-27 13:10:34 +00:00
Eric Covener
cbf81b4644 Merge r1919532, r1919533 from trunk:
*) mod_proxy: Avoid AH01059 parsing error for SetHandler "unix:" URLs
   in <Location> (incomplete fix in 2.4.62). PR 69160.

When SetHandler "unix:..." is used in a <Location "/path"> block, the path 
gets appended (including $DOCUMENT_ROOT somehow) to r->filename hence the
current checks in fixup_uds_filename() to add "localhost" when missing don't
work. Fix them.



mod_proxy: Allow for empty UDS URL hostname in ProxyPass workers too.

Using "unix:/udspath|scheme:" or "unix:/udspath|scheme://" for a ProxyPass URL
does not work currently, while it works for SetHandler "proxy:unix:...".



Submitted by: ylavic
Reviewed by: ylavic, covener, rpluem

Github: closes #467


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1920977 13f79535-47bb-0310-9956-ffa450edef68
2024-09-27 13:06:46 +00:00
Yann Ylavic
6932fc79f9 Don't reset the balancer when we create a new child
and don't change shared memory the load balancer is not using.


Merges r1916004 from trunk
Submitted by: jfclere
Reviewed by: jfclere, rpluem, gbechis


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1919145 13f79535-47bb-0310-9956-ffa450edef68
2024-07-11 14:35:05 +00:00
Yann Ylavic
2f2f82a222 mod_proxy: Avoid AH01059 parsing error for SetHandler "unix:" URLs. PR 69160
The hostname part of the URL is not mandated for UDS though the canon_handler
hooks will require it, so add "localhost" if it's missing (won't be used anyway
for an AF_UNIX socket).

This can trigger with SetHandler "unix:" URLs which are now also fixed up.


Follow up to r1919015: fix compilation.

mod_proxy: Fix canonicalisation and FCGI env (PATH_INFO, SCRIPT_NAME) for
           "balancer:" URLs set via SetHandler, also allowing for "unix:"
           sockets with BalancerMember(s).  PR 69168.

* modules/proxy/proxy_util.h, modules/proxy/proxy_util.c:
  Move proxy_interpolate() from mod_proxy.c to ap_proxy_interpolate(),
  exported locally only (non public).
  Move proxy_fixup() from mod_proxy.c to ap_proxy_canon_url(), exported
  locally only too (non public).
  Rollback ap_proxy_fixup_uds_filename() to a local fixup_uds_filename()
  usable from proxy_util.c only. The public function will be removed in
  a following commit.

* modules/proxy/mod_proxy.h:
  Note that ap_proxy_fixup_uds_filename() is deprecated.

* modules/proxy/mod_proxy.c:
  Just use ap_proxy_canon_url() from proxy_fixup() and proxy_handler()
  for SetHandler URLs.

* modules/proxy/mod_proxy_balancer.c:
  Do not canonicalize the path from proxy_balancer_canon() anymore but
  rather from balancer_fixup() where the balancer URL is rewritten to
  the BalancerMember URL.


mod_proxy: Don't mangle r->filename when ap_proxy_canon_netloc() fails.

ap_proxy_canon_netloc() called from the canon_handler hooks modifies its
given url in place, hence &r->filename[6] passed from ap_proxy_canon_url().

This is not an issue if the canon_handler hook succeeds (or declines) since
r->filename is usually completely rewritten finally, but on failure it gets
truncated.

Avoid this by passing a copy of r->filename from the start, the proxy *url
and r->filename don't need to point to the same data.

* proxy/proxy_util.c(ap_proxy_canon_url):
  Pass a copy of r->filename to the canon_handler hooks.


Follow up to r1919023: fix compilation.


Merges r1919015, r1919019, r1919022, r1919023, r1919024 from trunk
Reviewed by: rpluem, covener, ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1919138 13f79535-47bb-0310-9956-ffa450edef68
2024-07-11 13:58:12 +00:00
Eric Covener
fe171ffdf8 Merge r1918795, r1918814 from trunk:
maintain trusted flag


* Always trust content types that we set literally

Submitted by: covener, rpluem
Reviewed by: covener, jorton, rpluem

Github: closes #459


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1918839 13f79535-47bb-0310-9956-ffa450edef68
2024-07-02 13:07:17 +00:00
Yann Ylavic
6b8e043ce4 mod_proxy: Fixup UDS filename for mod_proxy called through r->handler.
* modules/proxy/proxy_util.c:
  Export ap_proxy_fixup_uds_filename() from fix_uds_filename.
  Call it from ap_proxy_pre_request() even for rewritten balancer workers.

* modules/proxy/mod_proxy.h:
  Declare ap_proxy_fixup_uds_filename()

* modules/proxy/mod_proxy.c:
  Fixup UDS filename from r->handler in proxy_handler().

* include/ap_mmn.h:
  Bump MMN minor for ap_proxy_fixup_uds_filename()


mod_proxy: follow up to r1918626: Simplify ap_proxy_fixup_uds_filename() and callers.


Merges r1918626, r1918647 from trunk
GH: closes #457


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1918666 13f79535-47bb-0310-9956-ffa450edef68
2024-06-26 14:51:32 +00:00
Eric Covener
1d98d4db18 Merge r1918606 from trunk:
validate hostname



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1918607 13f79535-47bb-0310-9956-ffa450edef68
2024-06-25 17:29:32 +00:00
Eric Covener
b10cb2d691 Merge r1918550 from trunk:
mod_proxy: escape for non-proxypass configuration



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1918559 13f79535-47bb-0310-9956-ffa450edef68
2024-06-24 17:52:31 +00:00
Stefan Eissing
c66fe1a1dc Merge GH PR #454
*) mod_proxy: Fix DNS requests and connections closed before the
     configured addressTTL.  BZ 69126.  [Yann Ylavic]



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1918543 13f79535-47bb-0310-9956-ffa450edef68
2024-06-24 12:38:11 +00:00
Eric Covener
a29723ce1a let httpd handle CL/TE for non-http handlers
backport r1916769 from trunk:
Submitted By: ylavic, covener



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1916777 13f79535-47bb-0310-9956-ffa450edef68
2024-04-03 12:10:49 +00:00
Joe Orton
45cfbb36ce Merge r1909450 from trunk:
Make sources build with latest clang version

Submitted by: icing
Reviewed by: minfrin, ylavic, jfclere


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1915534 13f79535-47bb-0310-9956-ffa450edef68
2024-02-02 11:50:07 +00:00
Graham Leggett
fd4338eca8 Backport to v2.4:
*) mod_proxy: Allow to set a TTL for how long DNS resolutions to backend
     systems are cached.
     In order to solve merge conflicts this proposal also backports:

     mod_proxy: Add optional third argument for ProxyRemote, which
     configures Basic authentication credentials to pass to the remote
     proxy.  PR 37355. (r1881790)

     mod_proxy: Ignore (and warn about) enablereuse=on for ProxyPassMatch when
     some dollar substitution (backreference) happens in the hostname or port
     part of the URL. (r1904513)

     Trunk version of patch:
        https://svn.apache.org/r1881790
        https://svn.apache.org/r1904513
        https://svn.apache.org/r1909400
        https://svn.apache.org/r1909401
        https://svn.apache.org/r1909402
        https://svn.apache.org/r1909451
        https://svn.apache.org/r1912459
        https://svn.apache.org/r1913432
        https://svn.apache.org/r1913534
     Backport version for 2.4.x of patch:
       https://patch-diff.githubusercontent.com/raw/apache/httpd/pull/390.diff
     Can be applied via apply_backport_pr.sh 390
     +1: rpluem, ylavic, minfrin




git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1913907 13f79535-47bb-0310-9956-ffa450edef68
2023-11-18 11:08:42 +00:00
Stefan Eissing
0d1d79b020 Merge from trunk:
*) mod_http2: added support for bootstrapping WebSockets via HTTP/2, as
     described in RFC 8441. A new directive 'H2WebSockets on|off' has been
     added. The feature is by default not enabled.
     As also discussed in the manual, this feature should work for setups
     using "ProxyPass backend-url upgrade=websocket" without further changes.
     Special server modules for WebSockets will have to be adapted,
     most likely, as the handling if IO events is different with HTTP/2.
     HTTP/2 WebSockets are supported on platforms with native pipes. This
     excludes Windows.
     New directive `H2ProxyRequests on|off` to enable handling
     of HTTP/2 requests in a forward proxy configuration.
     General forward proxying is enabled via `ProxyRequests`. If the
     HTTP/2 protocol is also enabled for such a server/host, this new
     directive is needed in addition.



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1911979 13f79535-47bb-0310-9956-ffa450edef68
2023-08-29 07:23:10 +00:00
Ruediger Pluem
fd92481223 Merge r1908827, r1908838 from trunk:
mod_proxy: Check for space/ctrls in nocanon path/urls before forwarding.



Follow up to r1908827: CHANGES entry.
Submitted by: ylavic
Reviewed by: ylavic, rpluem, covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1908865 13f79535-47bb-0310-9956-ffa450edef68
2023-03-31 14:37:07 +00:00
Ruediger Pluem
9b8cf1746b Merge r1908341, r1908628, r1908629 from trunk:
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.


* Whitespace fixes. No functional change.

* Fix typo

Reviewed by: rpluem, ylavic, covener

Github: closes #351


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1908864 13f79535-47bb-0310-9956-ffa450edef68
2023-03-31 14:33:00 +00:00
Eric Covener
11d58d4a43 Merge r1907505, r1908186 from trunk:
* In the reverse proxy case r->filename might contain a query string if
  the nocanon option was used with ProxyPass.
  If this is the case cut off the query string as the last parameter in
  this query string might end up on an extension we take care about, but
  we only want to match against path components not against query
  parameters.


* Add CHANGES entry for r1907505 [skip ci]

Reviewed By: rpluem, ylavic, covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1908538 13f79535-47bb-0310-9956-ffa450edef68
2023-03-19 21:33:35 +00:00
Eric Covener
a356fdbfb9 Merge r1908302 from trunk:
move B=xx example to the bottom

show example with quoted flags and a space


Reviewed By: ylavic, rpluem, covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1908536 13f79535-47bb-0310-9956-ffa450edef68
2023-03-19 21:29:58 +00:00
Eric Covener
8789f6bb92 Merge r1908095 from trunk:
don't forward invalid query strings

    Submitted by: rpluem

Reviewed By:  covener, fielding, rpluem, gbechis



git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1908096 13f79535-47bb-0310-9956-ffa450edef68
2023-03-05 20:28:43 +00:00
Eric Covener
d753ea76b5 Merge r1907980 from trunk:
mod_proxy_uwsgi: Stricter backend HTTP response parsing/validation

Reviewed By: ylavic, covener, gbechis, rpluem





git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1908094 13f79535-47bb-0310-9956-ffa450edef68
2023-03-05 20:22:52 +00:00
Eric Covener
86369476a5 Merge r1906940 from trunk:
* Report an error if the AJP backend sends an invalid number of headers

Reviewed By: rpluem, covener, ylavic


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1908026 13f79535-47bb-0310-9956-ffa450edef68
2023-03-03 14:21:26 +00:00
Eric Covener
d93e61e3e9 Merge r1906540 from trunk:
cleanup on error


Reviewed By: rpluem, gbechis, covener


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1906542 13f79535-47bb-0310-9956-ffa450edef68
2023-01-10 13:20:55 +00:00