From 351107bc8d378e794b295b0f58246274cb995c74 Mon Sep 17 00:00:00 2001 From: Christophe Jaillet Date: Fri, 11 Jan 2019 19:31:43 +0000 Subject: Fix websocket proxy over UDS. configuration example: ProxyPass unix:/var/run/unix.sock|ws://127.0.0.1/api Currently 'ap_proxy_get_worker()' can't get matched pre-defined worker because of different uri formatting in 'proxy_wstunnel_canon()' and ap_proxy_define_worker()' PR 62932 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1851093 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy_wstunnel.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modules/proxy/mod_proxy_wstunnel.c') diff --git a/modules/proxy/mod_proxy_wstunnel.c b/modules/proxy/mod_proxy_wstunnel.c index dcde71b0d9..064cccd4f8 100644 --- a/modules/proxy/mod_proxy_wstunnel.c +++ b/modules/proxy/mod_proxy_wstunnel.c @@ -279,7 +279,10 @@ static int proxy_wstunnel_canon(request_rec *r, char *url) if (path == NULL) return HTTP_BAD_REQUEST; - apr_snprintf(sport, sizeof(sport), ":%d", port); + if (port != def_port) + apr_snprintf(sport, sizeof(sport), ":%d", port); + else + sport[0] = '\0'; if (ap_strchr_c(host, ':')) { /* if literal IPv6 address */ -- cgit v1.2.3