httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 56707] Websocket response incorrectly includes transfer encoding chunked header
Date Thu, 10 Jul 2014 15:34:54 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=56707

--- Comment #4 from Ahab. A. <eabouzou@yahoo.com> ---
(In reply to Yann Ylavic from comment #3)
> Here is the patch on mod_proxy_wstunnel.c only:
> http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/proxy/
> mod_proxy_wstunnel.c?r1=1588495&r2=1588494&pathrev=1588495&view=patch

Hi Yann,

Just want to clarify things: 

1- I'm NOT using mod_proxy_wstunnel. We are using our own module that sets
these response headers.

2- The problem is happening because r->chunked gets set. Here is the exact line
(line http_protocol.c:246 in the long "if" condition) that sets it (in
particular r->chunked = 1):

|| ((r->proto_num >= HTTP_VERSION(1,1))
                && (r->chunked = 1))) /* THIS CODE IS CORRECT, see above. */

The debugger stops at line 247 (the line AFTER it happens) where it shows
r->server-keepalive. I hope this didn't cause a confusion.

3- The fix ideally would be in that "if" statement to guard setting r->chunked
if the protocol in the response status was 101 (websocket upgrade).

So to simplify the statement of the problem:
If my module sets these response headers and used a simple ap_rwrite() api to
write these headers, Apache would INJECT a Transfer-encoding: chunked header
which breaks a websocket client.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message