From: Jim Jagielski Date: Tue, 5 Mar 2013 19:18:55 +0000 (+0000) Subject: We need to ensure a conn_rec X-Git-Tag: 2.5.0-alpha~5696 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ff6e8614c3364789558601e0f8845d92bddedee;p=apache We need to ensure a conn_rec git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1452954 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_websocket.c b/modules/proxy/mod_proxy_websocket.c index a77a6e3b95..10ea8eca45 100644 --- a/modules/proxy/mod_proxy_websocket.c +++ b/modules/proxy/mod_proxy_websocket.c @@ -263,6 +263,7 @@ static int proxy_websocket_handler(request_rec *r, proxy_worker *worker, proxy_conn_rec *backend = NULL; char *scheme; int retry; + conn_rec *c = r->connection; proxy_dir_conf *dconf = ap_get_module_config(r->per_dir_config, &proxy_module); apr_pool_t *p = r->pool; @@ -316,6 +317,12 @@ static int proxy_websocket_handler(request_rec *r, proxy_worker *worker, status = HTTP_SERVICE_UNAVAILABLE; break; } + /* Step Three: Create conn_rec */ + if (!backend->connection) { + if ((status = ap_proxy_connection_create(scheme, backend, + c, r->server)) != OK) + break; + } /* Step Three: Process the Request */ status = ap_proxy_websocket_request(p, r, backend, origin, dconf, uri, locurl,