1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

Save a few bytes in the request pool.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1783057 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Christophe Jaillet
2017-02-15 03:52:57 +00:00
parent 94f37b1472
commit e6459db019

View File

@@ -2159,12 +2159,12 @@ static int lua_websocket_greet(lua_State *L)
encoded = apr_palloc(r->pool, encoded_len);
encoded_len = apr_base64_encode(encoded, (char*) digest, APR_SHA1_DIGESTSIZE);
r->status = 101;
apr_table_set(r->headers_out, "Upgrade", "websocket");
apr_table_set(r->headers_out, "Connection", "Upgrade");
apr_table_set(r->headers_out, "Sec-WebSocket-Accept", encoded);
apr_table_setn(r->headers_out, "Upgrade", "websocket");
apr_table_setn(r->headers_out, "Connection", "Upgrade");
apr_table_setn(r->headers_out, "Sec-WebSocket-Accept", encoded);
/* Trick httpd into NOT using the chunked filter, IMPORTANT!!!111*/
apr_table_set(r->headers_out, "Transfer-Encoding", "chunked");
apr_table_setn(r->headers_out, "Transfer-Encoding", "chunked");
r->clength = 0;
r->bytes_sent = 0;