]> granicus.if.org Git - apache/commitdiff
streamline
authorJim Jagielski <jim@apache.org>
Fri, 8 Mar 2013 14:55:56 +0000 (14:55 +0000)
committerJim Jagielski <jim@apache.org>
Fri, 8 Mar 2013 14:55:56 +0000 (14:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1454415 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_wstunnel.c

index 528530d372ac63ab53369a5dd4eb19ce4dbd7774..4f6310865fabf9f4b51c30c4b4112390ad2ee40b 100644 (file)
@@ -157,7 +157,6 @@ static int ap_proxy_wstunnel_request(apr_pool_t *p, request_rec *r,
     conn_rec *backconn = conn->connection;
     int client_error = 0;
     char *buf;
-    apr_size_t blen;
     apr_bucket_brigade *header_brigade;
     apr_bucket *e;
     char *old_cl_val = NULL;
@@ -175,18 +174,8 @@ static int ap_proxy_wstunnel_request(apr_pool_t *p, request_rec *r,
     if (rv != OK) {
         return rv;
     }
-    buf = apr_pstrcat(p, "Upgrade: ", "WebSocket", CRLF, NULL);
-    ap_xlate_proto_to_ascii(buf, strlen(buf));
-    e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
-    APR_BRIGADE_INSERT_TAIL(header_brigade, e);
-
-    buf = apr_pstrcat(p, "Connection: ", "Upgrade", CRLF, NULL);
-    ap_xlate_proto_to_ascii(buf, strlen(buf));
-    e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
-    APR_BRIGADE_INSERT_TAIL(header_brigade, e);
 
-    buf = CRLF;
-    blen = strlen(buf);
+    buf = apr_pstrcat(p, "Upgrade: WebSocket", CRLF, "Connection: Upgrade", CRLF, CRLF, NULL);
     ap_xlate_proto_to_ascii(buf, strlen(buf));
     e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
     APR_BRIGADE_INSERT_TAIL(header_brigade, e);