summaryrefslogtreecommitdiffstats
path: root/net/websockets/websocket_job.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add WebSocket handshake message in net_logukai@chromium.org2010-08-121-0/+9
| | | | | | | | | BUG=none TEST=websocket handshake message shown in chrome://net-internals/#requests Review URL: http://codereview.chromium.org/3076043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55845 0039d316-1c4b-4281-b951-d872f2087c98
* Net: Convert username and password to string16.thestig@chromium.org2010-07-291-2/+2
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3040016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54101 0039d316-1c4b-4281-b951-d872f2087c98
* Ignore OnConnected event if the job state is already CLOSED.ukai@chromium.org2010-06-291-0/+2
| | | | | | | | | | | There is a case while SocketStream is connecting, WebSocketJob is closed and SocketStream notifies it is connected. In this case, we should just ignore OnConnected event. BUG=47818 TEST=websocket/tests/url-with-credential.html Review URL: http://codereview.chromium.org/2823034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51108 0039d316-1c4b-4281-b951-d872f2087c98
* Check state in SocketStream delegate methods.ukai@chromium.org2010-06-171-0/+11
| | | | | | | | | | | I suspect flaky failure in reload-crash.html was OnSentData is called when state_ has been changed to CLOSED while sending handshake message. BUG=45720 TEST=none Review URL: http://codereview.chromium.org/2845012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50087 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor WebSocket handshake.ukai@chromium.org2010-06-031-189/+51
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/2452001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48816 0039d316-1c4b-4281-b951-d872f2087c98
* Fix regression of websocket/tests/simple-stress.htmlukai@chromium.org2010-06-011-4/+16
| | | | | | | | | | | | | | | | | | Since stress-test.html tries to send 256K message, but we'll set 32K for max_pending_send_allowed in SocketStream. Thus, WebCore::SocketStreamHandle won't send full websocket frame for such large message since WebSocketJob doesn't notify OnSentData at all. Don't parse websocket frame for sending to avoid this issue for now. Also disable buffering and parsing websocket frame for receiving to fix performance regression. BUG=32018 TEST=LayoutTests/websocket/tests/stress-test.html passes Review URL: http://codereview.chromium.org/2453002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48629 0039d316-1c4b-4281-b951-d872f2087c98
* Factor out WebSocket frame handler out of WebSocketJob.ukai@chromium.org2010-06-011-35/+139
| | | | | | | | | | | | | WebSocket frame handler might be used to count number of frames, variance of type or length of frame. It might be also used to compress/decompress message in websocket frame. BUG=none TEST=none Review URL: http://codereview.chromium.org/2078002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48615 0039d316-1c4b-4281-b951-d872f2087c98
* Fix WebSocketJob to pass /key_3/ after handshake request header.ukai@chromium.org2010-03-301-5/+9
| | | | | | | | | BUG=none TEST=WebSocketJob::SimpleHandshakeDraft76 passes Review URL: http://codereview.chromium.org/1256001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43054 0039d316-1c4b-4281-b951-d872f2087c98
* Use FilterHeaders() instead of HttpUtil::StripHeaders().ukai@chromium.org2010-03-251-5/+57
| | | | | | | | | | | | | | | | We want to pass original response headers to WebKit, but just dropping set cookie headers. HttpUtil::StripHeaders() strips malformed headers too, so handshake in websocket/tests/long-invalid-header.html will success unexpectedly. Use FilterHeaders() to preserve malformed headers in response headers. BUG=39062 TEST=handshake fails when malformed header is received. Review URL: http://codereview.chromium.org/1254001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42588 0039d316-1c4b-4281-b951-d872f2087c98
* Try to fix flaky websocket tests again.ukai@chromium.org2010-03-231-30/+29
| | | | | | | | | | | | | | | | | | | | | Some websoket layout tests became flaky from r41818. This is because it adds websocket throttling in WebSocketJob. Make sure Close() will call OnClose() even if it is waiting resolving or waiting in throttling queue, so that WebSocketJob is removed from throttling queue and wake up next WebSocketJob. r42074 was reverted because failure in SocketStreamMetrics::OnClose on Linux Builder (Views dbg). Ignore UMA record if the connection has not been established. TBR=tyoshino BUG=38397 TEST=layout tests websocket/tests passes Review URL: http://codereview.chromium.org/1134004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42320 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 42074 - Try to fix flaky websocket tests.amit@chromium.org2010-03-191-25/+30
| | | | | | | | | | | | | | | | | | | Some websoket layout tests became flaky from r41818. This is because it adds websocket throttling in WebSocketJob. Make sure Close() will call OnClose() even if it is waiting resolving or waiting in throttling queue, so that WebSocketJob is removed from throttling queue and wake up next WebSocketJob. BUG=38397 TEST=layout tests websocket/tests passes Review URL: http://codereview.chromium.org/1096001 TBR=ukai@chromium.org Review URL: http://codereview.chromium.org/1120004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42078 0039d316-1c4b-4281-b951-d872f2087c98
* Try to fix flaky websocket tests.ukai@chromium.org2010-03-191-30/+25
| | | | | | | | | | | | | | | | Some websoket layout tests became flaky from r41818. This is because it adds websocket throttling in WebSocketJob. Make sure Close() will call OnClose() even if it is waiting resolving or waiting in throttling queue, so that WebSocketJob is removed from throttling queue and wake up next WebSocketJob. BUG=38397 TEST=layout tests websocket/tests passes Review URL: http://codereview.chromium.org/1096001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42074 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor WebSocket throttling feature.ukai@chromium.org2010-03-171-0/+73
| | | | | | | | | Protocol specific handling should be done in SocketStreamJob subclasss, so websocket throttling should be handled in WebSocketJob. Review URL: http://codereview.chromium.org/669157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41818 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash in ExtensionApiTest.FLAKY_WebSocketukai@chromium.org2010-03-011-1/+2
| | | | | | | | | | TBR=darin BUG=none TEST=browser_tests ExtensionApiTest.FLAKY_WebSocket doesn't crash Review URL: http://codereview.chromium.org/660259 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40253 0039d316-1c4b-4281-b951-d872f2087c98
* Support HttpOnly cookie on Web Socketukai@chromium.org2010-03-011-0/+378
Web Socket should send "HttpOnly" cookie when handshaking. In WebKit/WebCore, WebSocketHandshake uses cookieRequestHeaderFieldValue() to get cookies including HttpOnly cookie. However, Chrome doesn't trunk renderer process, so we're not allowed to access HttpOnly cookie in WebCore. Thus, we handle HttpOnly cookies in browser process. Add SocketStreamJob as interface for protocol specific handling on SocketStream. WebSocketJob implements Web Socket specific handling. For now, it handles cookies in Web Socket. It checks Web Socket handshake request message from renderer process, and replaces Cookie: header to include HttpOnly cookies. It also checks Web Socket handshake response message, sets cookies if any, and strips Set-Cookie: header, so that renderer process couldn't see Set-Cookie: header. BUG=35660 TEST=net_unittests and layout_tests passes Review URL: http://codereview.chromium.org/601077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40250 0039d316-1c4b-4281-b951-d872f2087c98