WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
98000
[WebSocket] Add "Cache-Control: no-cache" to handshake request
https://bugs.webkit.org/show_bug.cgi?id=98000
Summary
[WebSocket] Add "Cache-Control: no-cache" to handshake request
Kenichi Ishibashi
Reported
2012-10-01 01:39:03 PDT
For compatibility improvement. Please refer followings.
http://code.google.com/p/chromium/issues/detail?id=148908
http://www.ietf.org/mail-archive/web/hybi/current/msg09841.html
I wait and see how the discussion on hybi goes. I'll create a patch unless no one has any objections.
Attachments
Patch
(7.12 KB, patch)
2012-10-11 23:20 PDT
,
Kenichi Ishibashi
no flags
Details
Formatted Diff
Diff
Patch
(7.64 KB, patch)
2012-10-11 23:47 PDT
,
Kenichi Ishibashi
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Yuta Kitamura
Comment 1
2012-10-01 02:07:39 PDT
It is somewhat hard to keep track of the history of this issue, so I'd like to summarize the motivation of this bug. A user report in Chromium
bug 148908
revealed that there is a (broken) proxy server in the wild, which rewrites "Connection: Upgrade" in the response to "Connection: close" (which causes the opening handshake to fail). It turned out that this can be avoided by adding "Pragma: no-cache" and "Cache-Control: no-cache" in the request headers. Seems like the proxy is trying to cache WebSocket's opening handshake, and the Connection header is modified as a result. Firefox has been sending no-cache headers and running without problems. I would like to wait and watch the HyBi thread, but for now I feel we should do the same as Firefox. I think there will be no bad side effect.
Kenichi Ishibashi
Comment 2
2012-10-11 23:20:02 PDT
Created
attachment 168365
[details]
Patch
Yuta Kitamura
Comment 3
2012-10-11 23:29:39 PDT
Comment on
attachment 168365
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168365&action=review
> Source/WebCore/Modules/websockets/WebSocketHandshake.cpp:215 > +
You need to add these headers in clientHandshakeRequest() function, too. Web Inspecter will use it to display request headers.
> LayoutTests/http/tests/websocket/tests/hybi/nocache-expected.txt:8 > +FAIL closeEvent.wasClean should be true. Threw exception ReferenceError: closeEvent is not defined
This needs to be fixed.
Kenichi Ishibashi
Comment 4
2012-10-11 23:47:27 PDT
Created
attachment 168367
[details]
Patch
Kenichi Ishibashi
Comment 5
2012-10-11 23:48:07 PDT
Comment on
attachment 168365
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=168365&action=review
>> Source/WebCore/Modules/websockets/WebSocketHandshake.cpp:215 >> + > > You need to add these headers in clientHandshakeRequest() function, too. Web Inspecter will use > it to display request headers.
Done.
>> LayoutTests/http/tests/websocket/tests/hybi/nocache-expected.txt:8 >> +FAIL closeEvent.wasClean should be true. Threw exception ReferenceError: closeEvent is not defined > > This needs to be fixed.
Oops. Thanks. Fixed.
Yuta Kitamura
Comment 6
2012-10-11 23:58:28 PDT
Comment on
attachment 168367
[details]
Patch OK. The HyBi thread has been silent, and there seems no objections.
Kenichi Ishibashi
Comment 7
2012-10-12 00:08:09 PDT
Comment on
attachment 168367
[details]
Patch Thanks!
WebKit Review Bot
Comment 8
2012-10-12 00:33:42 PDT
Comment on
attachment 168367
[details]
Patch Clearing flags on attachment: 168367 Committed
r131155
: <
http://trac.webkit.org/changeset/131155
>
WebKit Review Bot
Comment 9
2012-10-12 00:33:45 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug