gecko-dev/netwerk/protocol/http
Kris Maglione 440d6fcd02 Bug 1305162: Part 1a - Separate nsIMIMEInputStream headers from stream data. r=dragana
MozReview-Commit-ID: F1qZCBWUNRG

--HG--
extra : rebase_source : 7a4fdab3e4843a042a3d1101c5e58a6bb556ef7a
extra : source : de131f7c1fc1f60db42509aea646ef4540e6c5fe
2017-01-20 15:43:07 -08:00
..
AltDataOutputStreamChild.cpp Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm 2016-11-15 04:26:00 +01:00
AltDataOutputStreamChild.h Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm 2016-11-15 04:26:00 +01:00
AltDataOutputStreamParent.cpp Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm 2016-11-15 04:26:00 +01:00
AltDataOutputStreamParent.h Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm 2016-11-15 04:26:00 +01:00
AlternateServices.cpp Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
AlternateServices.h Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
ASpdySession.cpp Bug 1317430 - Avoid a unnecessary copy by passing a const & in netwerk/ r=valentin 2016-11-14 23:16:40 +01:00
ASpdySession.h
CacheControlParser.cpp
CacheControlParser.h
ConnectionDiagnostics.cpp
HSTSPrimerListener.cpp Bug 1313595 - Lower HSTS priming timeout r=mayhemer 2016-12-08 11:07:55 -10:00
HSTSPrimerListener.h Bug 1313595 - Lower HSTS priming timeout r=mayhemer 2016-12-08 11:07:55 -10:00
http2_huffman_table.txt
Http2Compression.cpp Bug 1296280 (part 2) - Add pref for our SETTINGS_MAX_TABLE_SIZE. r=mcmanus 2016-08-24 14:35:43 -07:00
Http2Compression.h Bug 1282408 - Add ignore-initialization-check annotation to variables mPeakSizeID and mPeakCountID from Http2BaseCompressor. r=valentin 2016-09-28 11:08:44 +03:00
Http2HuffmanIncoming.h
Http2HuffmanOutgoing.h
Http2Push.cpp
Http2Push.h
Http2Session.cpp Bug 1324855 - H2 telemetry for continued header sizes r=hurley r=bsmedberg 2016-12-20 13:54:15 -05:00
Http2Session.h Bug 1324855 - H2 telemetry for continued header sizes r=hurley r=bsmedberg 2016-12-20 13:54:15 -05:00
Http2Stream.cpp
Http2Stream.h
HttpBaseChannel.cpp Bug 1305162: Part 1a - Separate nsIMIMEInputStream headers from stream data. r=dragana 2017-01-20 15:43:07 -08:00
HttpBaseChannel.h Backed out 2 changesets (bug 1261585) for causing website bustage. 2017-01-17 23:29:11 -05:00
HttpChannelChild.cpp Backed out 2 changesets (bug 1261585) for causing website bustage. 2017-01-17 23:29:11 -05:00
HttpChannelChild.h Backed out 2 changesets (bug 1261585) for causing website bustage. 2017-01-17 23:29:11 -05:00
HttpChannelParent.cpp Backed out 2 changesets (bug 1261585) for causing website bustage. 2017-01-17 23:29:11 -05:00
HttpChannelParent.h Backed out 2 changesets (bug 1261585) for causing website bustage. 2017-01-17 23:29:11 -05:00
HttpChannelParentListener.cpp Backed out changeset 04cda7684b40 (bug 1217876) for failing xpcshell test test_resumable_channel_wrap.js in debug builds. r=backout 2016-09-25 11:00:29 +02:00
HttpChannelParentListener.h
HttpInfo.cpp
HttpInfo.h
HttpLog.h
InterceptedChannel.cpp
InterceptedChannel.h
make_incoming_tables.py
make_outgoing_tables.py
moz.build Bug 1307456 - Remove PackagedAppService/Verifier r=bagder 2016-10-31 15:21:14 +01:00
nsAHttpConnection.h Bug 1313639 - null check fwdobject in nsahttpconnection r=dragana 2016-10-28 10:22:35 -04:00
nsAHttpTransaction.h
nsCORSListenerProxy.cpp Bug 1286036 - Stop warning if a network request failed. r=mcmanus 2016-11-14 17:42:34 -08:00
nsCORSListenerProxy.h
nsHttp.cpp
nsHttp.h Bug 1321783 - Make updater be networking conservative r=dkeeler r=rstrong r=dragana 2016-12-02 16:49:23 -05:00
nsHttpActivityDistributor.cpp
nsHttpActivityDistributor.h
nsHttpAtomList.h Bug 1324872 - quic change from alt-protocol to alt-svc r=hurley 2016-12-20 15:38:45 -05:00
nsHttpAuthCache.cpp Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
nsHttpAuthCache.h
nsHttpAuthManager.cpp Bug 1324115 - Part 2: replace the callers to use C++ helper. r=smaug 2016-12-21 14:59:21 +08:00
nsHttpAuthManager.h
nsHttpBasicAuth.cpp
nsHttpBasicAuth.h
nsHttpChannel.cpp Bug 1331324 - Prevent network load time of custom conditional request from being reported. r=michal 2017-01-18 19:22:00 +08:00
nsHttpChannel.h Backed out 2 changesets (bug 1261585) for causing website bustage. 2017-01-17 23:29:11 -05:00
nsHttpChannelAuthProvider.cpp Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
nsHttpChannelAuthProvider.h Bug 1309438 - Don't reuse sticky connection after authentication failure. r=jduell 2016-11-25 03:33:00 -05:00
nsHttpChunkedDecoder.cpp Bug 1312548 - When changing buffer, get the new buffer size too. r=dd 2016-11-23 18:14:07 -05:00
nsHttpChunkedDecoder.h
nsHttpConnection.cpp Bug 1329089 - yield to other transactions while reaching the max write attempts. r=mcmanus 2017-01-06 17:55:34 +08:00
nsHttpConnection.h
nsHttpConnectionInfo.cpp Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
nsHttpConnectionInfo.h Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
nsHttpConnectionMgr.cpp Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
nsHttpConnectionMgr.h
nsHttpDigestAuth.cpp
nsHttpDigestAuth.h
nsHttpHandler.cpp Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
nsHttpHandler.h Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
nsHttpHeaderArray.cpp
nsHttpHeaderArray.h Bug 1293501 - Back out the debug patch (changeset 2eebd44ff2e9). r=me 2016-12-13 02:00:25 +08:00
nsHttpNTLMAuth.cpp Backed out changeset d1ef75d52b01 for landing with the wrong bug number in the commit message. 2016-11-11 10:44:54 -05:00
nsHttpNTLMAuth.h
nsHttpPipeline.cpp
nsHttpPipeline.h
nsHttpRequestHead.cpp Bug 1293501 - Back out the debug patch (changeset 2eebd44ff2e9). r=me 2016-12-13 02:00:25 +08:00
nsHttpRequestHead.h Bug 1293501 - Back out the debug patch (changeset 2eebd44ff2e9). r=me 2016-12-13 02:00:25 +08:00
nsHttpResponseHead.cpp
nsHttpResponseHead.h
nsHttpTransaction.cpp Bug 1318887 - Remove NS_GetAppInfo; r=mcmanus 2016-11-21 15:00:46 -05:00
nsHttpTransaction.h Bug 1318887 - Remove NS_GetAppInfo; r=mcmanus 2016-11-21 15:00:46 -05:00
nsICorsPreflightCallback.h
nsIHstsPrimingCallback.idl Bug 1313595 - Lower HSTS priming timeout r=mayhemer 2016-12-08 11:07:55 -10:00
nsIHttpActivityObserver.idl
nsIHttpAuthenticableChannel.idl Bug 1309438 - Don't reuse sticky connection after authentication failure. r=jduell 2016-11-25 03:33:00 -05:00
nsIHttpAuthenticator.idl
nsIHttpAuthManager.idl
nsIHttpChannel.idl Bug 1304623 - Create a pref to control the default referrer policy- part 2. r=mcmanus, r=bkelly 2017-01-05 11:30:03 +08:00
nsIHttpChannelAuthProvider.idl
nsIHttpChannelChild.idl
nsIHttpChannelInternal.idl Bug 1318759 - Properly query final class in HttpChannelParent::OnStartRequest to prevent evil static_cast, r=jduell 2016-12-09 05:52:00 +01:00
nsIHttpEventSink.idl
nsIHttpHeaderVisitor.idl
nsIHttpProtocolHandler.idl
nsIWellKnownOpportunisticUtils.idl
NullHttpChannel.cpp Bug 1170190 - Part 2: Add the nsIHttpChannel::IsTrackingResource() API to query the channel's tracking annotation; r=mayhemer 2016-12-23 14:40:11 -05:00
NullHttpChannel.h
NullHttpTransaction.cpp
NullHttpTransaction.h
PAltDataOutputStream.ipdl
PHttpChannel.ipdl Backed out 2 changesets (bug 1261585) for causing website bustage. 2017-01-17 23:29:11 -05:00
PHttpChannelParams.h
PSpdyPush.h Bug 1317430 - Avoid a unnecessary copy by passing a const & in netwerk/ r=valentin 2016-11-14 23:16:40 +01:00
README
TimingStruct.h
TunnelUtils.cpp Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
TunnelUtils.h
UserAgentOverrides.jsm Bug 1329182 - remove trailing newURI null parameters in the rest of the tree, r=jaws. 2017-01-09 20:27:26 +01:00
UserAgentUpdates.jsm
WellKnownOpportunisticUtils.js
WellKnownOpportunisticUtils.manifest

                                                        Darin Fisher
                                                        darin@netscape.com
                                                        8/8/2001

                            HTTP DESIGN NOTES


CLASS BREAKDOWN

  nsHttpHandler
    - implements nsIProtocolHandler
    - manages preferences
    - owns the authentication cache
    - holds references to frequently used services

  nsHttpChannel
    - implements nsIHttpChannel
    - talks to the cache
    - initiates http transactions
    - processes http response codes
    - intercepts progress notifications

  nsHttpConnection
    - implements nsIStreamListener & nsIStreamProvider
    - talks to the socket transport service
    - feeds data to its transaction object
    - routes progress notifications

  nsHttpConnectionInfo
    - identifies a connection

  nsHttpTransaction
    - implements nsIRequest
    - encapsulates a http request and response
    - parses incoming data

  nsHttpChunkedDecoder
    - owned by a transaction
    - removes chunked decoding

  nsHttpRequestHead
    - owns a nsHttpHeaderArray
    - knows how to fill a request buffer

  nsHttpResponseHead
    - owns a nsHttpHeaderArray
    - knows how to parse response lines
    - performs common header manipulations/calculations

  nsHttpHeaderArray
    - stores http "<header>:<value>" pairs

  nsHttpAuthCache
    - stores authentication credentials for http auth domains

  nsHttpBasicAuth
    - implements nsIHttpAuthenticator
    - generates BASIC auth credentials from user:pass


ATOMS

  nsHttp:: (header namespace)

  eg. nsHttp::Content_Length


TRANSACTION MODEL

  InitiateTransaction -> ActivateConnection -> AsyncWrite, AsyncRead

  The channel creates transactions, and passes them to the handler via
  InitiateTransaction along with a nsHttpConnectionInfo object
  identifying the requested connection.  The handler either dispatches
  the transaction immediately or queues it up to be dispatched later,
  depending on whether or not the limit on the number of connections
  to the requested server has been reached.  Once the transaction can
  be run, the handler looks for an idle connection or creates a new
  connection, and then (re)activates the connection, assigning it the
  new transaction.

  Once activated the connection ensures that it has a socket transport,
  and then calls AsyncWrite and AsyncRead on the socket transport.  This
  begins the process of talking to the server.  To minimize buffering,
  socket transport thread-proxying is completely disabled (using the flags
  DONT_PROXY_LISTENER | DONT_PROXY_PROVIDER | DONT_PROXY_OBSERVER with
  both AsyncWrite and AsyncRead).  This means that the nsHttpConnection's
  OnStartRequest, OnDataAvailable, OnDataWritable, and OnStopRequest
  methods will execute on the socket transport thread.

  The transaction defines (non-virtual) OnDataReadable, OnDataWritable, and
  OnStopTransaction methods, which the connection calls in response to
  its OnDataAvailable, OnDataWritable, and OnStopRequest methods, respectively.
  The transaction owns a nsStreamListenerProxy created by the channel, which
  it uses to transfer data from the socket thread over to the client's thread.
  To mimize buffering, the transaction implements nsIInputStream, and passes
  itself to the stream listener proxy's OnDataAvailable.  In this way, we
  have effectively wedged the response parsing between the socket and the
  thread proxy's buffer.  When read, the transaction turns around and reads
  from the socket using the buffer passed to it.  The transaction scans the
  buffer for headers, removes them as they are detected, and copies the headers
  into its nsHttpResponseHead object.  The rest of the data remains in the
  buffer, and is proxied over to the client's thread to be handled first by the
  http channel and eventually by the client.

  There are several other major design factors, including:

    - transaction cancelation
    - progress notification
    - SSL tunneling
    - chunked decoding
    - thread safety
    - premature EOF detection and transaction restarting
    - pipelining (not yet implemented)


CACHING

<EOF>