]> granicus.if.org Git - apache/commitdiff
Fix websocket proxy over UDS.
authorChristophe Jaillet <jailletc36@apache.org>
Fri, 11 Jan 2019 19:31:43 +0000 (19:31 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Fri, 11 Jan 2019 19:31:43 +0000 (19:31 +0000)
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

CHANGES
modules/proxy/mod_proxy_wstunnel.c

diff --git a/CHANGES b/CHANGES
index cc8051e09850de9f321e3d307909487e22ca8bfb..a83bd10ae55a5dd7930ba46a8527da3bd6e0ddb1 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.1
 
+  *) mod_proxy_wstunnel: Fix websocket proxy over UDS.
+     PR 62932 <pavel dcmsys.com>
+  
   *) mod_negociation: LanguagePriority should be case-insensitive in order to
      match AddLanguage behavior. PR 39730 [Christophe Jaillet]
   
index dcde71b0d9a9cb6d8cd126f9195dc65093eda450..064cccd4f8fc1eb74ae7015b4cbbbaa2cc40c7b0 100644 (file)
@@ -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 */