]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
mod_proxy_wstunnel: leave Upgrade requests handling to mod_proxy_http.
authorYann Ylavic <ylavic@apache.org>
Thu, 7 Jan 2021 13:19:08 +0000 (13:19 +0000)
committerYann Ylavic <ylavic@apache.org>
Thu, 7 Jan 2021 13:19:08 +0000 (13:19 +0000)
commit35a265606855386c80b1bd0ea8b8fe1cf6a8e01a
tree5474c8e6282261914a46f6473c57ee184e4981cb
parent0ab46cc0e4aa02d6fbb3cd7eb0bf6e02f6f981af
mod_proxy_wstunnel: leave Upgrade requests handling to mod_proxy_http.

Let mod_proxy_http's canon and scheme handlers accept "ws[s]:" schemes so that
mod_proxy_wstunnel can decline requests when mod_proxy_http is loaded.

* modules/proxy/{mod_proxy.h,proxy_util.c} (ap_proxy_worker_can_upgrade):
  Add a "dflt" argument to ap_proxy_worker_can_upgrade() which, if not NULL,
  is matched when no worker upgrade= parameter is configured. This allows to
  handle the default "Upgrade: websocket" case for "ws[s]:" schemes.

* modules/proxy/mod_proxy_http.c (proxy_http_canon, proxy_http_handler):
  Add and use the new get_url_scheme() helper to parse URL schemes handled by
  mod_proxy_http and use it in canon and scheme handlers. This helper now
  accepts ws[s] schemes.

* modules/proxy/mod_proxy_wstunnel.c (proxy_wstunnel_post_config):
  New post_config hook to detect whether mod_proxy_http is loaded and set
  global fallback_to_mod_proxy_http flag in this case.

* modules/proxy/mod_proxy_wstunnel.c (proxy_wstunnel_check_trans,
                                      proxy_wstunnel_canon,
                                      proxy_wstunnel_handler):
  These hooks now early return DECLINED if fallback_to_mod_proxy_http is set.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1885239 13f79535-47bb-0310-9956-ffa450edef68
changes-entries/proxy_wstunnel_to_http.txt [new file with mode: 0644]
docs/log-message-tags/next-number
modules/proxy/mod_proxy.h
modules/proxy/mod_proxy_http.c
modules/proxy/mod_proxy_wstunnel.c
modules/proxy/proxy_util.c