summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_session.cc
Commit message (Collapse)AuthorAgeFilesLines
* TBR: reverting broken commiterikchen@google.com2010-07-121-48/+24
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52113 0039d316-1c4b-4281-b951-d872f2087c98
* Make the various SocketParams reference counted.vandebo@chromium.org2010-07-121-3/+4
| | | | | | | | | | | This is so that the SSLSocketParam can hold one of any of the existing SocketParams. BUG=30357 TEST=existing unit tests Review URL: http://codereview.chromium.org/2848029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52107 0039d316-1c4b-4281-b951-d872f2087c98
* Streams send a Rst frame upon being closed by client. Some minor editorial ↵erikchen@google.com2010-07-121-24/+48
| | | | | | | | | | | | | fixes. TEST=net_unittests BUG=46589 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=51007 Review URL: http://codereview.chromium.org/2804008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52106 0039d316-1c4b-4281-b951-d872f2087c98
* Client attempts to start a new spdy transaction with a session that is ↵erikchen@google.com2010-07-091-1/+3
| | | | | | | | | | | closing down. TEST=net_unittests BUG=47455,48503 Review URL: http://codereview.chromium.org/2841029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52001 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Streams send a Rst frame upon being closed by client. Some minor ↵oshima@chromium.org2010-06-281-48/+24
| | | | | | | | | | | | editorial fixes." This reverts commit 699468c59a6563db5fb3fb4739c6710a279a4067. TBR=erikchen@google.com Review URL: http://codereview.chromium.org/2852029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51011 0039d316-1c4b-4281-b951-d872f2087c98
* Streams send a Rst frame upon being closed by client. Some minor editorial ↵erikchen@google.com2010-06-281-24/+48
| | | | | | | | | | | fixes. TEST=net_unittests BUG=46589 Review URL: http://codereview.chromium.org/2804008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51007 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY: Make sure we don't try to send https/wss over an unauthenticated, but ↵willchan@chromium.org2010-06-281-14/+41
| | | | | | | | | | encrypted SSL socket. BUG=46924 Review URL: http://codereview.chromium.org/2805039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50997 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove svn:executable from a bunch of files.thestig@chromium.org2010-06-251-0/+0
| | | | | | | | BUG=none TEST=checkperms.py passes Review URL: http://codereview.chromium.org/2850030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50887 0039d316-1c4b-4281-b951-d872f2087c98
* Ignore duplicate SYN_REPLYs on the same stream. Added a unit test.mlloyd@chromium.org2010-06-241-4/+11
| | | | | | | | | BUG=45639 TEST=Added unit test, which caused an ASSERT fail before but now passes. Review URL: http://codereview.chromium.org/2871015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50751 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed bug where streams do not shutdown properly after the user callback ↵erikchen@google.com2010-06-241-201/+52
| | | | | | | | | | | | | | | | | | | deletes the stream. Added a unit test. TEST=net_unittests BUG=46925 Merge branch 'trunk' of http://src.chromium.org/git/chromium into ukai_delegate_fix Revert "Revert 50215 because of crashes - Refactor SpdyStream to get HTTP specific out of the interface and members." This reverts commit 8f9bf3b9ba6663aeef7fbdab3edf16aeaa510f84. Review URL: http://codereview.chromium.org/2810022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50739 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash in GetSpdySessionFromSSLSocket in the case where thembelshe@chromium.org2010-06-241-7/+13
| | | | | | | | | | server immediately hangs up after negotiating SPDY via NPN. BUG=46369 TEST=SpdyNPNServerHangup Review URL: http://codereview.chromium.org/2862027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50689 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 50215 because of crashes - Refactor SpdyStream to get HTTP specific ↵willchan@chromium.org2010-06-181-52/+201
| | | | | | | | | | | | | | | | | | | | | out of the interface and members. Add SpdyStream::Delegate interface and SpdyHttpStream implements SpdyStream::Delegate. SpdyHeaderBlock<>HTTP request/response conversion functions moved from spdy_session.cc to spdy_http_stream.cc. All interface between SpdySession and SpdyStream uses SpdyHeaderBlock instead of HttpRequestInfo,HttpResponseInfo. BUG=42320,46925 TEST=none Review URL: http://codereview.chromium.org/2667002 TBR=ukai@chromium.org Review URL: http://codereview.chromium.org/2827015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50268 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor SpdyStream to get HTTP specific out of the interface and members.ukai@chromium.org2010-06-181-201/+52
| | | | | | | | | | | | | | | | Add SpdyStream::Delegate interface and SpdyHttpStream implements SpdyStream::Delegate. SpdyHeaderBlock<->HTTP request/response conversion functions moved from spdy_session.cc to spdy_http_stream.cc. All interface between SpdySession and SpdyStream uses SpdyHeaderBlock instead of HttpRequestInfo,HttpResponseInfo. BUG=42320 TEST=none Review URL: http://codereview.chromium.org/2667002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50215 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash in SpdySession::DeleteStream.ukai@chromium.org2010-06-181-2/+2
| | | | | | | | | | | Erase iterator before calling OnClose BUG=46765 TEST=none Review URL: http://codereview.chromium.org/2847015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50198 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash in DeleteStream.ukai@chromium.org2010-06-161-2/+3
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/2860004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49923 0039d316-1c4b-4281-b951-d872f2087c98
* cleaned up the way that streams close so that all of them use DeleteStreamerikchen@google.com2010-06-151-55/+39
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/2764005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49856 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor SpdyStream.ukai@chromium.org2010-06-141-14/+18
| | | | | | | | | | | | | | | Split SpdyStream into two parts: base SpdyStream and SpdyHttpStream. SpdyStream is an interface to SpdySession and provides base implementation as spdy stream. SpdyHttpStream is derived class of SpdyStream and used for [Spdy|Http]NetworkTransaction. BUG=42320 TEST=none Review URL: http://codereview.chromium.org/2564001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49667 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY: Fix stream cancellation during ReadResponseBody() callback.willchan@chromium.org2010-06-071-3/+8
| | | | | | | | BUG=44800 Review URL: http://codereview.chromium.org/2565005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49061 0039d316-1c4b-4281-b951-d872f2087c98
* Import the server-side code for URL encoding & unittest.mbelshe@chromium.org2010-06-071-1/+0
| | | | | | | | | | BUG=none TEST=UrlToFilenameEncoderTest Review URL: http://codereview.chromium.org/2511001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49056 0039d316-1c4b-4281-b951-d872f2087c98
* This change enables FieldTrial for SPDY. When --use-spdy=npn is used, field ↵lzheng@chromium.org2010-05-211-0/+5
| | | | | | | | | | | | | | | | | test won't be enabled. However, when that flag is missing, A/B test is added to browser_main.cc. Trial A: use npn and spdy. B: use npn but no spdy. C: do nothing. A and B are set to zero for now The histograms we collect are: 1. Page begin to finish time when spdy is enabled/disabled across all sites; 2. Page begin to finish time when spdy is used on sites that support spdy and when spdy is intentionally ignored. BUG=43997 TEST=Don't use --use-spdy=npn, manually change _npn_nospdy and _npn_withspdy percentile and go to spdy supported sites. Review URL: http://codereview.chromium.org/2036012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47896 0039d316-1c4b-4281-b951-d872f2087c98
* Add more histograms for SPDY and settings.mbelshe@chromium.org2010-05-211-13/+57
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/2098013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47894 0039d316-1c4b-4281-b951-d872f2087c98
* Separate SPDY data-frame compression from the header compressors.mbelshe@chromium.org2010-05-211-2/+2
| | | | | | | | | BUG=none TEST=SpdyFramerTest.UnclosedStreamDataCompressors, SpdyFramerTest.DataCompression Review URL: http://codereview.chromium.org/2071009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47886 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 47342.willchan@chromium.org2010-05-161-6/+55
| | | | | | | | | | | Fixes the merge issue this time. Also fixes a TODO in another change that was blocked on this one. Support SpdySession as a new NetLog source type. Start logging some more SPDY control frames. Original code review: http://codereview.chromium.org/2102003/show BUG=43237 Review URL: http://codereview.chromium.org/2114003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47376 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY: Add push streams to the NetLog.willchan@chromium.org2010-05-151-1/+18
| | | | | | | | | | For streams that already have delegates, they have their own NetLogs so use those. For streams that don't have delegates, just write out to the session's NetLog. TODO(willchan): Use a different event type once the SpdySession NetLog tracker is landed. Review URL: http://codereview.chromium.org/2101003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47346 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 47342 - Support SpdySession as a new NetLog source type. Start ↵willchan@chromium.org2010-05-151-54/+3
| | | | | | | | | | | | | logging some more SPDY control frames. BUG=43237 Review URL: http://codereview.chromium.org/2102003 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/2118003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47343 0039d316-1c4b-4281-b951-d872f2087c98
* Support SpdySession as a new NetLog source type. Start logging some more ↵willchan@chromium.org2010-05-151-3/+54
| | | | | | | | | | SPDY control frames. BUG=43237 Review URL: http://codereview.chromium.org/2102003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47342 0039d316-1c4b-4281-b951-d872f2087c98
* Add SPDY SYN_STREAM and SYN_REPLY events to about:net-internals.willchan@chromium.org2010-05-131-21/+71
| | | | | | | | BUG=43237 Review URL: http://codereview.chromium.org/2004010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47174 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb NetLog into SpdySession.willchan@chromium.org2010-05-121-10/+10
| | | | | | | | TODO(willchan): Start logging events for SpdySession. Review URL: http://codereview.chromium.org/2059004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47047 0039d316-1c4b-4281-b951-d872f2087c98
* Fix valgrind memcheck issues with GetPushStream unit test.cbentzel@chromium.org2010-05-101-2/+1
| | | | | | | | | BUG=None TEST=valgrind --leak-check=yes net_unittests --gtest_filter="*SpdySessionTest.GetPushStream*" Review URL: http://codereview.chromium.org/1951001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46823 0039d316-1c4b-4281-b951-d872f2087c98
* Fix leak in SpdyNetworkTransactionTest.CloseWithActiveStream.mbelshe@chromium.org2010-05-051-1/+1
| | | | | | | | | | | | | | The test case identified a case where previously we hung (we didn't close out the stream on the now-dead session). With the fix, we closed the streams, but we didn't remove the session reference, leaving it leaked. The test case did properly catch this. BUG=43179 TEST=SpdyNetworkTransactionTest.CloseWithActiveStream. Review URL: http://codereview.chromium.org/1916004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46518 0039d316-1c4b-4281-b951-d872f2087c98
* Fix SPDY crash where we receive an early SYN_REPLY.mbelshe@chromium.org2010-05-051-2/+9
| | | | | | | | | | | | | | | Added a test case which simulates this by doing a POST and scheduling the SYN_REPLY to arrive before we've finished sending. Also improved the error checking in SpdyStream a bit. BUG=43133 TEST=SpdyNetworkTransactionTest.PostWithEarlySynReply Review URL: http://codereview.chromium.org/1931003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46505 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a hang on SPDY session teardown when streams are still active.mbelshe@chromium.org2010-05-041-2/+1
| | | | | | | | | | BUG=43134 TEST=SpdyNetworkTransactionTest.CloseWithActiveStream Review URL: http://codereview.chromium.org/1937005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46373 0039d316-1c4b-4281-b951-d872f2087c98
* Unit test for server push and GetPushStream.cbentzel@chromium.org2010-05-041-2/+2
| | | | | | | | | BUG=None TEST=net_unittests --gtest_filter="SpdySessionTest.GetPushStream" Review URL: http://codereview.chromium.org/1783013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46313 0039d316-1c4b-4281-b951-d872f2087c98
* A couple of SPDY server push bug fixes.mbelshe@chromium.org2010-04-291-1/+1
| | | | | | | | | | | | | | | | | | GFE and the SPDY spec both require lower-case headers, so I've updated the Chrome SPDY stack and the unit tests to use lower-case x-associated-content. Also fixes a bug in SpdyStream::DoReadBody that breaks push streams in certain situations (they never get their body data). Landing for Matthew Lloyd (mlloyd@google.com) BUG=none TEST=SpdyNetworkTransactionTest.ServerPush Review URL: http://codereview.chromium.org/1755017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46000 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove the implicit constructor for BoundNetLog that allowed ↵eroman@chromium.org2010-04-281-1/+1
| | | | | | | | | passing NULL in place of a const BoundNetLog&. BUG=37421 Review URL: http://codereview.chromium.org/1783008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45851 0039d316-1c4b-4281-b951-d872f2087c98
* More cleanup to address TODOs in net_log.h.eroman@chromium.org2010-04-281-1/+1
| | | | | | | | | | | * Removes 9 methods: AddEventWithParameters, BeginEventWithParameters, EndEventWithParameters, BeginEventWithString, BeginEventWithInteger, AddEventWithString, AddEventWithInteger, EndEventWithParameters, EndEventWithInteger. This was becoming ridiculous, instead made the EventParameters* a required parameter. * Moves CapturingBoundNetLog / CapturingNetLog to its own file. BUG=37421 Review URL: http://codereview.chromium.org/1746012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45843 0039d316-1c4b-4281-b951-d872f2087c98
* Add net log entries that summarize transmit and receive byte counts.vandebo@chromium.org2010-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | Tx/Rx summaries are integrated into the net log at the last point that bytes were transmitted or received. Hopefully this will help resolve http://crbug.com/37729 by showing if we've received bytes over the network when we hit the "Waiting for cache" bug. This change also modernizes the use of NetLog: - ClientSocket now has a net_log() accessor - ClientSocket::Connect no longer takes a NetLog, instead the TCPClientSocket constructor takes one, others use their transport socket's NetLog - TCPClientSocket creates a new source id with source type SOCKET Also updates PassiveLogCollector infrastructure: - The LiveRequestsObserver lets a RequestTracker update a RequestInfo just before it is displayed. This allows ConnectJobs to be associated with URLRequests while connecting and then reassociated if they are late-bound to a different request. BUG=37729 TEST=tx/rx lines show up in chrome://net-internals/ Review URL: http://codereview.chromium.org/1696005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45449 0039d316-1c4b-4281-b951-d872f2087c98
* Fix cases where SpdySession can double-remove from the SpdySessionPool.mbelshe@chromium.org2010-04-231-3/+11
| | | | | | | | | BUG=42229 TEST=SpdyNetworkTransactionTest.GoAwayWithActiveStream Review URL: http://codereview.chromium.org/1747006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45447 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crasher on SpdySession teardown. When we close the session on error,mbelshe@chromium.org2010-04-211-0/+4
| | | | | | | | | | | | | | | | | | we can get into a case where we delete the session itself while cleaning out the active streams. This ends up with a re-entrant call into CloseAllStreams. Fix is to self-hold a reference during teardown. The test case crashes without the fix, and works fine with the fix. BUG=42215 TEST=SpdyNetworkTransactionTest.GoAwayWithActiveStream Review URL: http://codereview.chromium.org/1711008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45210 0039d316-1c4b-4281-b951-d872f2087c98
* Use HttpRequestHeaders for extra_headers.willchan@chromium.org2010-04-201-7/+7
| | | | | | | | BUG=22588 Review URL: http://codereview.chromium.org/1604011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45096 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY: Remove invalid DCHECK.willchan@chromium.org2010-04-191-2/+0
| | | | | | | | After GOAWAY frame support, it's possible for multiple SpdySessions to exist for the same host port pair. Review URL: http://codereview.chromium.org/1630029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44971 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY: Minor code cleanup.willchan@chromium.org2010-04-161-4/+5
| | | | | | | | | | Use !empty() instead of size(). Fix a LOG bug where we printed the wrong string. Use DCHECK_GT. Review URL: http://codereview.chromium.org/1668002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44839 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash in WriteSocket() when sending Settings framesmbelshe@chromium.org2010-04-161-1/+7
| | | | | | | | | | | | | | | and compression is enabled. We need better unit tests for the compressed-frame testing. Filed bug 41805 to implement those. BUG=41803 TEST=NONE Review URL: http://codereview.chromium.org/1648014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44819 0039d316-1c4b-4281-b951-d872f2087c98
* Take 2 at landing the SPDY SETTINGS frame patch.mbelshe@chromium.org2010-04-091-43/+68
| | | | | | | | | BUG=34749 TEST=SpdyNetworkTransactionTest.Setting* Review URL: http://codereview.chromium.org/1547028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44118 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 44092 - Add support for the SPDY session frame.jar@chromium.org2010-04-091-68/+43
| | | | | | | | | | | | | | per request from Mbelshe... reverting to fix tree. BUG=34749 TEST=SpdyNetworkTransactionTest.SettingsSaved, SettingsPlayback Review URL: http://codereview.chromium.org/1595013 TBR=mbelshe@chromium.org Review URL: http://codereview.chromium.org/1621009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44093 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for the SPDY session frame.mbelshe@chromium.org2010-04-091-43/+68
| | | | | | | | | BUG=34749 TEST=SpdyNetworkTransactionTest.SettingsSaved, SettingsPlayback Review URL: http://codereview.chromium.org/1595013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44092 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY: Improve logging messages for SpdySession.willchan@chromium.org2010-03-301-3/+9
| | | | | | Review URL: http://codereview.chromium.org/1582001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43087 0039d316-1c4b-4281-b951-d872f2087c98
* Re-enable the ConnectFailure case. Previously, this test casembelshe@chromium.org2010-03-291-0/+4
| | | | | | | | | | | | reported valgrind warnings; the warnings are legit; we were leaking the sessions in this case through two different leaks BUG=29471 TEST=SpdyNetworkTransactionTest.ConnectFailure Review URL: http://codereview.chromium.org/1553005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42995 0039d316-1c4b-4281-b951-d872f2087c98
* Reducing the debug output spam.ahendrickson@google.com2010-03-251-4/+0
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/1321002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42694 0039d316-1c4b-4281-b951-d872f2087c98
* SpdySession now sets the following fields in HttpResponseInfo: ahendrickson@google.com2010-03-251-20/+52
| | | | | | | | | | | | | | | | | | | | | | | request_time response_time vary_data There is also a unit test to exercise the new functionality. - Changed CreateSpdyHeadersFromHttpRequest() to use std::string::append() rather than std::string::operator+() to append a single '\0' character to the string, as the former does nothing. - Now using SpdyFramer. - The unit tests now include all server push cases. BUG=34505 TEST=Run netunittests.exe --gtest_filter=SpdyNetworkTransactionTest.* Review URL: http://codereview.chromium.org/634002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42660 0039d316-1c4b-4281-b951-d872f2087c98