diff options
author | Christophe Jaillet <jailletc36@apache.org> | 2019-01-11 20:31:43 +0100 |
---|---|---|
committer | Christophe Jaillet <jailletc36@apache.org> | 2019-01-11 20:31:43 +0100 |
commit | 351107bc8d378e794b295b0f58246274cb995c74 (patch) | |
tree | afbc18212753bb0b03f4d35bcc1116a8721a5c82 /modules/proxy/mod_proxy_wstunnel.c | |
parent | LanguagePriority should be case-insensitive in order to match AddLanguage beh... (diff) | |
download | apache2-351107bc8d378e794b295b0f58246274cb995c74.tar.xz apache2-351107bc8d378e794b295b0f58246274cb995c74.zip |
Fix websocket proxy over UDS.
configuration example:
<Location "/apis">
ProxyPass unix:/var/run/unix.sock|ws://127.0.0.1/api
</Location>
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 <pavel dcmsys.com>
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1851093 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | modules/proxy/mod_proxy_wstunnel.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 */ |