summaryrefslogtreecommitdiffstats
path: root/net/spdy
Commit message (Collapse)AuthorAgeFilesLines
* Backout SpdySettingsID implicit renumbering.jgraettinger@chromium.org2014-04-021-10/+11
| | | | | | | | | | | | | | | | | Renumbering was introduced in https://codereview.chromium.org/202383002/ SpdyConstants (added in that CL) is now responsible for mapping settings to protocol-specific wire values. SpdySettingsIds was absolved of responsibility for capturing wire settings ID's, and the removal of explicit enum values was cosmetic. However it's interacting poorly with settings persistence, which is caching setting ID's keyed on the enumeration values. So back it out. BUG=358677 Review URL: https://codereview.chromium.org/221173004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261021 0039d316-1c4b-4281-b951-d872f2087c98
* Rename PrivateMode enum values:rch@chromium.org2014-04-019-29/+29
| | | | | | | | | | | | | | | | | | kPrivacyModeDisabled => PRIVACY_MODE_DISABLED kPrivacyModeEnabled => PRIVACY_MODE_ENABLED To match the chromium style guide: Though the Google C++ Style Guide now says to use kConstantNaming for enums, Chromium was written using MACRO_STYLE naming. Continue to use this style for consistency. R=mef@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260281 Review URL: https://codereview.chromium.org/215023002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260729 0039d316-1c4b-4281-b951-d872f2087c98
* Add settings IDs to SpdyConstants.jgraettinger@chromium.org2014-03-3112-406/+1118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor only, no behavioral change. This lands server change 63167890 by hkhalil. https://codereview.chromium.org/202383002/ Syntactic-only changes to use protocol_version() over spdy_version_ in SpdyFramer. Also use the lowest possible enumeration value when doing comparisons, which makes deprecating older versions easier. This lands server change 63165647 by hkhalil. https://codereview.chromium.org/202113002/ Add some break statements in spdy_protocol for clarity. This lands server change 63158241 by hkhalil. https://codereview.chromium.org/198213007/ Minor logging change for catching development errors during testing. This lands server change 63102059 by hkhalil. https://codereview.chromium.org/201943003/ Introduce new SpdyConstants class Used for translating between code constants and on-the-wire representations (which differ from version to version). Currently only handles SpdyFrameType constants. This lands server change 62928184 by hkhalil. https://codereview.chromium.org/202073003/ Fix SpdyFramerTest.ProcessDataFrameWithPadding so it no longer tells SpdyFramer to read past the end of a buffer. This lands server change 62728542 by elving. https://codereview.chromium.org/197863004/ Added OverwriteFlags method to SpdyFrameBuilder. If we find the after-compression payload of a HEADERS or PUSH_PROMISE is too long, we can go back and turn off the END_HEADERS or END_PUSH_PROMISE flag. Will be used in a follow-up CL to automatically serialize header blocks across CONTINUATION frames as needed. This lands server change 62682641 by mlavan. https://codereview.chromium.org/202063002/ Update SPDY4 length field to exclude frame prefix length. Does not enforce the new 16KB max frame size. This lands server change 62559133 by mlavan. https://codereview.chromium.org/202033002/ Implement padding for SPDY4/HTTP2 DATA frames. Padding is correctly interpreted, but not emitted. This lands server change 62555297 by raullenchai. https://codereview.chromium.org/199843005/ Review URL: https://codereview.chromium.org/202403002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260477 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Rename PrivateMode enum values: ↵rch@chromium.org2014-03-289-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/215023002/) Reason for revert: Broke build. http://build.chromium.org/p/chromium.linux/builders/Linux%20Builder%20%28dbg%29/builds/71042/steps/compile/logs/stdio#error1 Original issue's description: > Rename PrivateMode enum values: > > kPrivacyModeDisabled => PRIVACY_MODE_DISABLED > kPrivacyModeEnabled => PRIVACY_MODE_ENABLED > > To match the chromium style guide: > > Though the Google C++ Style Guide now says to use kConstantNaming for enums, > Chromium was written using MACRO_STYLE naming. Continue to use this style for consistency. > > R=mef@chromium.org > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260281 TBR=mef@chromium.org,zea@chromium.org NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/217053010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260296 0039d316-1c4b-4281-b951-d872f2087c98
* Rename PrivateMode enum values:rch@chromium.org2014-03-289-29/+29
| | | | | | | | | | | | | | | | kPrivacyModeDisabled => PRIVACY_MODE_DISABLED kPrivacyModeEnabled => PRIVACY_MODE_ENABLED To match the chromium style guide: Though the Google C++ Style Guide now says to use kConstantNaming for enums, Chromium was written using MACRO_STYLE naming. Continue to use this style for consistency. R=mef@chromium.org Review URL: https://codereview.chromium.org/215023002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260281 0039d316-1c4b-4281-b951-d872f2087c98
* Instrument SpdyStream to catch delegate write handlers closing |this|.jgraettinger@chromium.org2014-03-272-1/+10
| | | | | | | | | | | | | | | | A long-standing assertion in SpdyStream is that delegate write handlers don't close |this|. This assertion was preserved in the recent SpdyStream state refactor. However after enabling the REMOTE_CLOSE stream state, crbug.com/355511 indicates that this assertion isn't always true. Insrument SpdyStream to fail with a usable stack-trace within the delegate call destroying |this|. BUG=355511 Review URL: https://codereview.chromium.org/212793008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260014 0039d316-1c4b-4281-b951-d872f2087c98
* Remove failing CHECK(!delegate_) from SpdyStream::OnDataReceived()jl@opera.com2014-03-271-1/+0
| | | | | | | | | | | | | | There is a race between SetDelegate() and the PushedStreamReplay() call it posts a task for, and OnDataReceived() called as more data is received over the network. Specifically, if the latter is called after SetDelegate() is called but before the task it posted has been executed, the CHECK() fails. BUG=356110 Review URL: https://codereview.chromium.org/210733006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259800 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 'Fix SPDY error-handling if the connection gets closed just after use.'davidben@chromium.org2014-03-258-86/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Include a fix for a test to appease ASan. Original description: > - Make SpdySession::IsReused() return true if the underlying socket was > UNUSED_IDLE. This makes the HttpNetworkTransaction-level retry try a fresh > socket in case a preconnected socket was stale. > > - If the SpdySession closes in an event loop iteration between > HttpStreamFactoryImplJob::DoCreateStream and OnNewSpdySessionReadyCallback, > propogate the error to the request to prevent it from hanging. Do so by > creating the originating request's SpdyHttpStream as soon as the SpdySession > is created so it can sample SpdySession::IsReused() and advise > HttpNetworkTransaction on error. > > - Delay pumping the SpdySession read loop by an event loop iteration. This > simplifies some logic and ensures that HttpNetworkTransaction receives a > SpdyHttpStream to advise retry logic. This does mean we lose the error code; > it now follows the asynchronous case and turns into ERR_CONNECTION_CLOSED in > SpdyHttpStream::InitializeStream. > > BUG=352156 > > Review URL: https://codereview.chromium.org/200723004 BUG=352156 Review URL: https://codereview.chromium.org/199633019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259208 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Fix SPDY error-handling if the connection gets closed just after ↵vandebo@chromium.org2014-03-217-76/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | use. (https://codereview.chromium.org/200723004/) Reason for revert: Linux LSan isn't happy: AddressSanitizer: stack-buffer-overflow http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%2BLSan%20Tests%20%281%29/builds/650/steps/net_unittests/logs/GetUploadProgressBeforeInitialization_0 Original issue's description: > Fix SPDY error-handling if the connection gets closed just after use. > > - Make SpdySession::IsReused() return true if the underlying socket was > UNUSED_IDLE. This makes the HttpNetworkTransaction-level retry try a fresh > socket in case a preconnected socket was stale. > > - If the SpdySession closes in an event loop iteration between > HttpStreamFactoryImplJob::DoCreateStream and OnNewSpdySessionReadyCallback, > propogate the error to the request to prevent it from hanging. Do so by > creating the originating request's SpdyHttpStream as soon as the SpdySession > is created so it can sample SpdySession::IsReused() and advise > HttpNetworkTransaction on error. > > - Delay pumping the SpdySession read loop by an event loop iteration. This > simplifies some logic and ensures that HttpNetworkTransaction receives a > SpdyHttpStream to advise retry logic. This does mean we lose the error code; > it now follows the asynchronous case and turns into ERR_CONNECTION_CLOSED in > SpdyHttpStream::InitializeStream. > > BUG=352156 > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=258647 TBR=rch@chromium.org,davidben@chromium.org NOTREECHECKS=true NOTRY=true BUG=352156 Review URL: https://codereview.chromium.org/208663003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258657 0039d316-1c4b-4281-b951-d872f2087c98
* Fix SPDY error-handling if the connection gets closed just after use.davidben@chromium.org2014-03-217-86/+76
| | | | | | | | | | | | | | | | | | | | | | | | | - Make SpdySession::IsReused() return true if the underlying socket was UNUSED_IDLE. This makes the HttpNetworkTransaction-level retry try a fresh socket in case a preconnected socket was stale. - If the SpdySession closes in an event loop iteration between HttpStreamFactoryImplJob::DoCreateStream and OnNewSpdySessionReadyCallback, propogate the error to the request to prevent it from hanging. Do so by creating the originating request's SpdyHttpStream as soon as the SpdySession is created so it can sample SpdySession::IsReused() and advise HttpNetworkTransaction on error. - Delay pumping the SpdySession read loop by an event loop iteration. This simplifies some logic and ensures that HttpNetworkTransaction receives a SpdyHttpStream to advise retry logic. This does mean we lose the error code; it now follows the asynchronous case and turns into ERR_CONNECTION_CLOSED in SpdyHttpStream::InitializeStream. BUG=352156 Review URL: https://codereview.chromium.org/200723004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258647 0039d316-1c4b-4281-b951-d872f2087c98
* Fix "unreachable code" warnings (MSVC warning 4702) in net/.pkasting@chromium.org2014-03-191-15/+10
| | | | | | | | | | BUG=346399 TEST=none R=rvargas@chromium.org Review URL: https://codereview.chromium.org/203013002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258136 0039d316-1c4b-4281-b951-d872f2087c98
* Change the SPDY4 maximum frame size to 16K-1jgraettinger@chromium.org2014-03-195-46/+67
| | | | | | | | | | | | | | | | | | | | | | This lands server change 62231065 by hkhalil. (Note Chromium uses SpdyFramer::GetControlFrameBufferMaxSize(), rather than SpdyFramer::kMaxControlFrameSize, to control this). Additional enforcement of this limit to come in follow-up CLs. Also adds some DCHECKs for better debugability of problematic test code. Adds some clamping to the maximum frame size to DATA frame size calculation in SpdyWriter. This has no effect for SPDY < 4, since maximum DATA frame payload there is huge. This lands server change 62302279 by hkhalil. BUG=345769 Review URL: https://codereview.chromium.org/184723002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257860 0039d316-1c4b-4281-b951-d872f2087c98
* SpdyFramer now uses HPACK for SPDY4 headers (re-apply)jgraettinger@chromium.org2014-03-197-501/+540
| | | | | | | | | | | | | | | | | | SpdyFramer defers calling OnControlFrameHeadersData() until the entire HPACK headers block has been decoded. At that point, the block is re-encoded to legacy SPDY3 format and passed to the visitor. This is a temporary measure suitable for testing only, intended to allow a decoupled switch to HPACK prior to being fully wired for SpdyHeadersHandlerInterface. This lands server change 62461978 by jgraettinger. BUG=339578 Review URL: https://codereview.chromium.org/201373002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257857 0039d316-1c4b-4281-b951-d872f2087c98
* Allow removing private data in chrome://net-export.davidben@chromium.org2014-03-185-33/+17
| | | | | | | | | | | | | | | | | | | | | This introduces a new LogLevel, LOG_STRIP_PRIVATE_DATA, which callbacks within the network stack check to decide whether or not to report redacted data. Unfortunately, this involves duplicating the net-internals implementation, but that implementation isn't easily reusable given chrome://net-exports' constraints. Plumb this state through net-export and adjust the UI and state machine accordingly. Add various tests. This also moves HttpAuth::ChallengeTokenizer to HttpUtil::ChallengeTokenizer as some of the redaction logic reuses the parser. This avoids giving everything a dependency on HttpAuth. BUG=349502 Review URL: https://codereview.chromium.org/182523006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257645 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 257227 "SpdyFramer now uses HPACK for SPDY4 headers"jam@chromium.org2014-03-145-531/+496
| | | | | | | | | | | | | | | | | | | | | | | | | | Broke sizes: http://build.chromium.org/p/chromium/builders/Linux/builds/48243 > SpdyFramer now uses HPACK for SPDY4 headers > > SpdyFramer defers calling OnControlFrameHeadersData() until the entire HPACK > headers block has been decoded. At that point, the block is re-encoded to > legacy SPDY3 format and passed to the visitor. > > This is a temporary measure suitable for testing only, intended to allow > a decoupled switch to HPACK prior to being fully wired for > SpdyHeadersHandlerInterface. > > This lands server change 62461978 by jgraettinger. > > BUG=339578 > > Review URL: https://codereview.chromium.org/195413002 TBR=jgraettinger@chromium.org Review URL: https://codereview.chromium.org/197283020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257247 0039d316-1c4b-4281-b951-d872f2087c98
* SpdyFramer now uses HPACK for SPDY4 headersjgraettinger@chromium.org2014-03-145-496/+531
| | | | | | | | | | | | | | | | | | SpdyFramer defers calling OnControlFrameHeadersData() until the entire HPACK headers block has been decoded. At that point, the block is re-encoded to legacy SPDY3 format and passed to the visitor. This is a temporary measure suitable for testing only, intended to allow a decoupled switch to HPACK prior to being fully wired for SpdyHeadersHandlerInterface. This lands server change 62461978 by jgraettinger. BUG=339578 Review URL: https://codereview.chromium.org/195413002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257227 0039d316-1c4b-4281-b951-d872f2087c98
* Remove broken closed push logic in SpdyHttpStream::SendRequest()jgraettinger@chromium.org2014-03-141-4/+1
| | | | | | | | | | | SendRequest() now behaves as other SpdyHttpStream transaction methods, and directly returns the |closed_stream_status_| of closed streams. BUG=346470 Review URL: https://codereview.chromium.org/197473013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257157 0039d316-1c4b-4281-b951-d872f2087c98
* Change DCHECK_IS_ON() to DCHECK_IS_ONwangxianzhu@chromium.org2014-03-142-26/+27
| | | | | | | | | | | | | | | DCHECK_IS_ON has been a constant since r255987, and can be used in both if() and #if. It no more needs to be in function form. Converted 'if (DCHECK_IS_ON)' to '#if DCHECK_IS_ON' if proper. BUG=350462 TEST=build TBR=darin Review URL: https://codereview.chromium.org/195973002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257156 0039d316-1c4b-4281-b951-d872f2087c98
* Additional sanity CHECKs on SPDY payloads.jgraettinger@chromium.org2014-03-142-2/+9
| | | | | | | | | | | | | | Expect that read completions are no longer than the read buffer SpdySession provided. Expect that sizes passed to MakeSpdyFrame() are not larger than the maximum theoretical SPDY frame size. BUG=344080 Review URL: https://codereview.chromium.org/195453003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257145 0039d316-1c4b-4281-b951-d872f2087c98
* Remove NetLog::LOG_BASIC.davidben@chromium.org2014-03-121-8/+8
| | | | | | | | | | | | It's only used in test code. Preparatory CL to introduce a LOG_STRIP_PRIVATE_DATA log level, so we don't have to break the ordering of levels. BUG=349502 Review URL: https://codereview.chromium.org/196203002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256690 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor HpackDecoder's public API to ease integration into SpdyFramer.jgraettinger@chromium.org2014-03-1110-144/+423
| | | | | | | | | | | | | | | | | | | | | HpackDecoder now mimics SpdyHeadersBlockParser's API, one suited to incremental parsing and the planned SpdyHeadersHandlerInterface switch. However the current implementation buffers the headers block until fully recieved, and further buffers the decoded block on SpdyFramer's behalf. This is a temporary measure suited for testing only. HpackDecoder & HpackEncoder now handle details of Cookie crumbling and restruction, and a canonical read-only Huffman table for use by SpdyFramer has been added. This lands server change 62275041 by jgraettinger. BUG=339578 Review URL: https://codereview.chromium.org/178603003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256257 0039d316-1c4b-4281-b951-d872f2087c98
* Implement HPACK draft '06 maximum size context updatejgraettinger@chromium.org2014-03-1015-153/+353
| | | | | | | | | | | | | | | | | | | | | | | | | HpackEncodingContext now separately tracks maximum table size setting, and maximum table size. Handlers for each context update have been added, and clear-reference-set update semantics have been removed from ProcessIndexedHeader(). HpackDecoder now handles maximum-size update opcodes. Also refactored ProcessNextHeaderRepresentation() into opcode-specific handlers for readability. Added test peers to HpackEncodingContext & HpackDecoder (to simplify inspection of the header table), and tests for new functionality. This CL completes changes required for HPACK draft '06. Update remaining references to '05. This lands server change 61957108 by jgraettinger. BUG=339578 Review URL: https://codereview.chromium.org/181543006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256029 0039d316-1c4b-4281-b951-d872f2087c98
* Move WriteFile and WriteFileDescriptor from file_util to base namespace.brettw@chromium.org2014-03-061-3/+3
| | | | | | | | | R=viettrungluu@chromium.org TBR=viettrungluu Review URL: https://codereview.chromium.org/184563006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255418 0039d316-1c4b-4281-b951-d872f2087c98
* Reland "Add base::TimeDelta::Max()" again.gavinp@chromium.org2014-03-051-3/+1
| | | | | | | | | | | | | Webkit layout tests found more media logs serializing infinite durations to JSON. R=scherkus@chromium.org TBR=ajwong@chromium.org,jar@chromium.org,jamesr@chomium.org,acolwell@chromium.org,nick@chromium.org BUG=None Review URL: https://codereview.chromium.org/186683002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255128 0039d316-1c4b-4281-b951-d872f2087c98
* Update HPACK Huffman code for '06 draft releasejgraettinger@chromium.org2014-03-045-354/+68
| | | | | | | | | | | | | This effectively just drops the separate response code. Tests have been updated to use the new request-code spec fixtures. This lands server change 61954666 by jgraettinger. BUG=339578 Review URL: https://codereview.chromium.org/182283003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254829 0039d316-1c4b-4281-b951-d872f2087c98
* Revert of Reland "Add base::TimeDelta::Max()" ↵apavlov@chromium.org2014-03-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (https://codereview.chromium.org/183763011/) Reason for revert: http/tests/media/video-cookie.html is asserting on debug bots Original issue's description: > Reland "Add base::TimeDelta::Max()" > > Media was exposing max timedeltas to JSON, which wasn't working with > infinity. > > R=scherkus@chromium.org > TBR=ajwong@chromium.org,jar@chromium.org,jamesr@chomium.org,acolwell@chromium.org,nick@chromium.org > BUG=None > > Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=254717 TBR=ajwong@chromium.org,jar@chromium.org,scherkus@chromium.org,jamesr@chomium.org,acolwell@chromium.org,nick@chromium.org,gavinp@chromium.org NOTREECHECKS=true NOTRY=true BUG=None Review URL: https://codereview.chromium.org/179813009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254743 0039d316-1c4b-4281-b951-d872f2087c98
* Reland "Add base::TimeDelta::Max()"gavinp@chromium.org2014-03-041-3/+1
| | | | | | | | | | | | | Media was exposing max timedeltas to JSON, which wasn't working with infinity. R=scherkus@chromium.org TBR=ajwong@chromium.org,jar@chromium.org,jamesr@chomium.org,acolwell@chromium.org,nick@chromium.org BUG=None Review URL: https://codereview.chromium.org/183763011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254717 0039d316-1c4b-4281-b951-d872f2087c98
* Enable HPACK Huffman decoding.jgraettinger@chromium.org2014-03-049-152/+531
| | | | | | | | | | | | | | | | | HpackDecoder is now constructed with an HpackHuffmanTable instance, and applies it in the decoding of Huffman-encoded literals. New HpackDecoder & HpackInputStream tests added for Huffman decoding, including the full set of Huffman-encoded request and response examples from the draft specification. This lands server change 61903931 by jgraettinger. BUG=339578 Review URL: https://codereview.chromium.org/182393002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254691 0039d316-1c4b-4281-b951-d872f2087c98
* Implement SPDY4 CONTINUATION frame in SpdyFramer.jgraettinger@chromium.org2014-03-0313-119/+813
| | | | | | | | | | | | Add new continuation flags to HEADERS and PUSH_PROMISE frames for SPDY4/HTTP2. This lands server change 62086574 by mlavan. BUG=345769 Review URL: https://codereview.chromium.org/183983002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254526 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a bunch of unused network flags.willchan@chromium.org2014-03-012-8/+1
| | | | | | | | | | | | | | --enable-sdch (renamed to --enable-sdch-over-https) --enable-spdy2 --max-spdy-concurrent-streams (kept the ability in the networking library to expose this for configuration purposes, but chromium will not configure it) --enable-ip-pooling --disable-ip-pooling BUG=344673,303957,344684,344698,344793 Review URL: https://codereview.chromium.org/169053004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254316 0039d316-1c4b-4281-b951-d872f2087c98
* Remove SPDY4 RST_STREAM payload flag remnants.jgraettinger@chromium.org2014-02-282-54/+6
| | | | | | | | | | | | Upstream flag allow_spdy_4_rst_stream_opaque_data has been deprecated. This lands server change 62210395 by mlavan. BUG=345769 Review URL: https://codereview.chromium.org/184713002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254237 0039d316-1c4b-4281-b951-d872f2087c98
* Processing for new SPDY4/HTTP2 SETTINGS frame payload format.jgraettinger@chromium.org2014-02-285-101/+195
| | | | | | | | | | This lands server change 62089770 by mlavan. BUG=345769 Review URL: https://codereview.chromium.org/183743007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254233 0039d316-1c4b-4281-b951-d872f2087c98
* HpackHuffmanTable::DecodeString shouldn't presume an output size.jgraettinger@chromium.org2014-02-283-53/+109
| | | | | | | | | | | | | | | | | | DecodeString formerly decoded until an expected output size was met. This was based on a misreading of the HPACK spec: Huffman literal sizes constrain the amount of decode input, not the amount of output. Instead, assume that |in| will be a bounded reader of the Huffman string to decode, and that |out.capacity()| is the bound on acceptable decoded output size. These constraints will be managed by the HPACK decoder. This lands server change 61903245 by jgraettinger. BUG=339578 Review URL: https://codereview.chromium.org/177533027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254199 0039d316-1c4b-4281-b951-d872f2087c98
* Add missing #include of <algorithm> for std::minscottmg@chromium.org2014-02-281-0/+2
| | | | | | | | | | | (Required on VS2013) TBR=mattm@chromium.org BUG=309197 Review URL: https://codereview.chromium.org/180153007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254026 0039d316-1c4b-4281-b951-d872f2087c98
* Implement HPACK Huffman encoding & decoding.jgraettinger@chromium.org2014-02-289-7/+1608
| | | | | | | | | | | | | | | | Adds HpackHuffmanTable & tests, which is responsible for rebuilding canonical Huffman codes from specified code lengths, and for encoding and decoding strings using the constructed code. This CL does not tie HpackHuffmanTable to HPACK opcodes. That'll happen next. This lands server change 61755107 by jgraettinger. BUG=339578 Review URL: https://codereview.chromium.org/181653003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254018 0039d316-1c4b-4281-b951-d872f2087c98
* SPDY4 Settings ACK supportjgraettinger@chromium.org2014-02-2710-26/+149
| | | | | | | | | | | | | Update SpdyFramer/SpdyDispatcher to send a SETTINGS ACK after processing a SETTINGS frame, and receive SETTINGS ACK frames without choking. This lands server change 61532046 by mlavan. BUG=345769 Review URL: https://codereview.chromium.org/181613002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253880 0039d316-1c4b-4281-b951-d872f2087c98
* Extract buffer management logic from SpdyHeadersBlockParser.jgraettinger@chromium.org2014-02-279-326/+783
| | | | | | | | | | | | | | | | | | | | | | Reader concept is extracted into new class SpdyPrefixedBufferReader and companion class SpdyPinnableBufferPiece, which manage details of non-copying reads across disjoint buffers. SpdyHeadersBlockParser is given its own error enum to remove dependency on a Google-internal enum, and to treat insufficient data as a recoverable error in the SpdyHeadersBlockParser state machine. SpdyHeadersBlockParser tests are updated to correctly retain storage of mock arguments on the stack. This lands server change 61753532 by jgraettinger. This skips over server change 59584319 by ygi. BUG=345769 Review URL: https://codereview.chromium.org/181683003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253870 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 253502 "Add base::TimeDelta::Max()."waffles@chromium.org2014-02-271-1/+3
| | | | | | | | | | | | | | | | | | | | > Add base::TimeDelta::Max(). > > TimeDelta::Max() is a maximum timedelta, larger than any timedelta you > can compare it to. The results of adding it to a time, or another time > delta are undefined. > > R=ajwong@chromium.org,mkwst@chromium.org,jar@chromium.org > TBR=jamesr@chomium.org,acolwell@chromium.org,nick@chromium.org > BUG=None > > Review URL: https://codereview.chromium.org/163413004 TBR=gavinp@chromium.org Review URL: https://codereview.chromium.org/179763006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253643 0039d316-1c4b-4281-b951-d872f2087c98
* Add base::TimeDelta::Max().gavinp@chromium.org2014-02-261-3/+1
| | | | | | | | | | | | | | TimeDelta::Max() is a maximum timedelta, larger than any timedelta you can compare it to. The results of adding it to a time, or another time delta are undefined. R=ajwong@chromium.org,mkwst@chromium.org,jar@chromium.org TBR=jamesr@chomium.org,acolwell@chromium.org,nick@chromium.org BUG=None Review URL: https://codereview.chromium.org/163413004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253502 0039d316-1c4b-4281-b951-d872f2087c98
* Implements the ACK flag for SPDY4/HTTP2 PING framesjgraettinger@chromium.org2014-02-2513-45/+88
| | | | | | | | | | | | | This lands server change 61378132 by birenroy. Also update SpdySession, BufferedSpdyFramer, etc to accept and pass the |is_ack| flag. BUG=345769 Review URL: https://codereview.chromium.org/169283012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@253088 0039d316-1c4b-4281-b951-d872f2087c98
* Enable SpdyStream's HALF_CLOSED_REMOTE state.jgraettinger@chromium.org2014-02-155-68/+133
| | | | | | | | | | | | | | | Unit-tests cover HTTP case of a response received before post completes, and websocket case of a CLOSE frame with SPDY FIN set (client should still send a websocket CLOSE). Also rename SpdyStream::IsIdleTemporaryRename() back to IsIdle(). TEST=Also tested with Fedor's test case from the ticket. BUG=330860 Review URL: https://codereview.chromium.org/129543002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251450 0039d316-1c4b-4281-b951-d872f2087c98
* Changes the type for PING id from uint32 to uint64.jgraettinger@chromium.org2014-02-1214-29/+76
| | | | | | | | | | | | Required for HTTP2. This lands server change 60786018 by birenroy. Minor type updates to QUIC/SpdySession & friends were also required. Review URL: https://codereview.chromium.org/154353003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250767 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor SpdyStream to model HTTP/2 stream statesjgraettinger@chromium.org2014-02-124-46/+117
| | | | | | | | | | | | | | | | | SpdyStream's private state implementation is refactored to the HTTP/2 states and transitions. HTTP/2 states which aren't yet supported (RESERVED_REMOTE, HALF_CLOSED_REMOTE) have been omitted for now. Note that the previous IDLE state had a meaning equivalent to the HTTP/2 OPEN state. Uses of IsIdle() have been updated. A follow-up CL will change/test SpdyStream behavior to enable the HALF_CLOSED_REMOTE state. BUG=330860 Review URL: https://codereview.chromium.org/126923003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250749 0039d316-1c4b-4281-b951-d872f2087c98
* Deprecate instead of close SPDY sessions upon network change. This brings ↵pauljensen@chromium.org2014-02-064-160/+134
| | | | | | | | | | our SPDY behavior for network changes more in line with our HTTP behavior where we only close idle sockets. The benefit of this is fewer SPDY streams interrupted with ERR_NETWORK_CHANGED while still maintaining the basic principle that after a network change new requests get routed properly to possibly newly available hosts (http://crbug.com/26156). For now this change only affects Android, Windows and iOS as these OSs appear to close TCP connections upon network disconnects. I'm avoiding applying this change to other OSs because it would lead to more sockets silently dying and waiting indefinitely rather than quickly failing upon network disconnects. BUG=166593 Review URL: https://codereview.chromium.org/129873010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249349 0039d316-1c4b-4281-b951-d872f2087c98
* Implement decoding of literal headers with incremental indexing for HPACKjgraettinger@chromium.org2014-02-063-7/+70
| | | | | | | | | | This lands server change 60592123 by akalin. BUG=339578 Review URL: https://codereview.chromium.org/154293002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249196 0039d316-1c4b-4281-b951-d872f2087c98
* Final cleanup of unused methods for SPDY credential frames.jgraettinger@chromium.org2014-02-062-3/+1
| | | | | | | | This lands server change 60686225 by mlavan. Review URL: https://codereview.chromium.org/154363002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249178 0039d316-1c4b-4281-b951-d872f2087c98
* Remove SpdyStream::DoLoop().jgraettinger@chromium.org2014-02-052-177/+63
| | | | | | | | | | | | Upcoming HTTP/2 state machine support will invalidate SpdyStream lifetime assumptions which DoLoop() is currently making. R=akalin BUG=330860 Review URL: https://codereview.chromium.org/149253009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249159 0039d316-1c4b-4281-b951-d872f2087c98
* Spdy: Send a RST_STREAM when expiring unclaimed push streams.jgraettinger@chromium.org2014-02-052-39/+64
| | | | | | | | | | | | | | Because unclaimed streams do not send flow control window updates, silently expiring an unclaimed large stream may leave it indefinitely stalled on the server, consuming resources. Also switch related test to use deterministic socket data, to enable unittest verification that a reset was sent. BUG=272484 R=rch@chromium.org Review URL: https://codereview.chromium.org/151603002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249116 0039d316-1c4b-4281-b951-d872f2087c98
* Implement decoding of indexed headers for HPACKjgraettinger@chromium.org2014-01-319-7/+168
| | | | | | | | | | | | | | Also update the handling of indexed headers to match the -05 spec (i.e., handle the special-cased 0 index). This lands server change 60576720 by akalin. BUG=339578 R=rch@chromium.org Review URL: https://codereview.chromium.org/142083006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248278 0039d316-1c4b-4281-b951-d872f2087c98
* SpdyStream: Rename and update comments on members.jgraettinger@chromium.org2014-01-312-35/+43
| | | | | | | | | | | Part 1 of a larger SpdyStream refactor to HTTP/2 states. This CL streamlines SpdyStream variable names to clarify how they interact with the HTTP/2 state machine (to be added). R=akalin BUG=330860 Review URL: https://codereview.chromium.org/149463007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248090 0039d316-1c4b-4281-b951-d872f2087c98