From 951d640efe2fd25c0b979388a8f19b7b930fc70f Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Thu, 22 Aug 2024 10:01:39 -0400 Subject: [PATCH] fixes #3728 with solution provided by httpd devs (#3730) * fixes #3728 with solution provided by httpd devs * use base uri and let httpd set the query parameters --- mod_ood_proxy/lib/ood/proxy.lua | 9 ++++----- mod_ood_proxy/lib/pun_proxy.lua | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/mod_ood_proxy/lib/ood/proxy.lua b/mod_ood_proxy/lib/ood/proxy.lua index 08a13ed54c..81ce24c442 100644 --- a/mod_ood_proxy/lib/ood/proxy.lua +++ b/mod_ood_proxy/lib/ood/proxy.lua @@ -7,17 +7,16 @@ function set_reverse_proxy(r, conn) -- find protocol used by parsing the request headers local protocol = (r.headers_in['Upgrade'] and "ws://" or "http://") - -- setup request to use mod_proxy for the reverse proxy - r.handler = "proxy-server" - r.proxyreq = apache2.PROXYREQ_REVERSE -- define reverse proxy destination using connection object if conn.socket then - r.filename = "proxy:unix:" .. conn.socket .. "|" .. protocol .. "localhost" .. conn.uri + r.handler = "proxy:unix:" .. conn.socket .. "|" .. protocol .. "localhost" else - r.filename = "proxy:" .. protocol .. conn.server .. conn.uri + r.handler = "proxy:" .. protocol .. conn.server end + r.filename = conn.uri + -- include useful information for the backend server -- provide the protocol used diff --git a/mod_ood_proxy/lib/pun_proxy.lua b/mod_ood_proxy/lib/pun_proxy.lua index c47dc64657..0062740350 100644 --- a/mod_ood_proxy/lib/pun_proxy.lua +++ b/mod_ood_proxy/lib/pun_proxy.lua @@ -38,7 +38,7 @@ function pun_proxy_handler(r) local conn = {} conn.user = user conn.socket = pun_socket_root .. "/" .. user .. "/passenger.sock" - conn.uri = r.unparsed_uri + conn.uri = r.uri -- start up PUN if socket doesn't exist local err = nil