gecko-dev/netwerk/protocol/http
Honza Bambas 2dfe5d94b8 Bug 1319111 - Expose 'result principal URI' on LoadInfo as a source for NS_GetFinalChannelURI (removes some use of LOAD_REPLACE flag). r=bz 2017-05-23 08:09:00 -04:00
..
ASpdySession.cpp Bug 1322373 - TLS 1.3 early-data for HTTP/2. r=dragana,mcmanus 2017-02-21 15:19:46 -05:00
ASpdySession.h Bug 1337791 - Part 2: http/2 origin frame extension. r=nwgh 2017-04-03 17:23:55 -04:00
AltDataOutputStreamChild.cpp Bug 1363653 - Make AltDataOutputStreamParent not send any messages after object destruction r=mayhemer 2017-05-11 21:35:37 +02:00
AltDataOutputStreamChild.h Bug 1363653 - Make AltDataOutputStreamParent not send any messages after object destruction r=mayhemer 2017-05-11 21:35:37 +02:00
AltDataOutputStreamParent.cpp Bug 1363653 - Make AltDataOutputStreamParent not send any messages after object destruction r=mayhemer 2017-05-11 21:35:37 +02:00
AltDataOutputStreamParent.h Bug 1363653 - Make AltDataOutputStreamParent not send any messages after object destruction r=mayhemer 2017-05-11 21:35:37 +02:00
AlternateServices.cpp Bug 1347461 - Part 1: Add a C++ API for the list of DataStorage classes; r=keeler 2017-04-10 22:44:32 -04:00
AlternateServices.h Bug 1334690 - Isolate AlternateService mappings by Origin Attributes. r=mcmanus 2017-02-14 16:49:59 +08:00
CacheControlParser.cpp
CacheControlParser.h
ConnectionDiagnostics.cpp Bug 1360236 - make gSocketThread an internal implementation detail of nsSocketTransportService; r=mcmanus 2017-04-27 14:34:42 -04:00
HSTSPrimerListener.cpp Bug 1316358 - Mark HSTS priming requests as urgent start. r=kmckinley 2017-03-01 06:12:00 -05:00
HSTSPrimerListener.h
Http2Compression.cpp Bug 1360574 - Detect & handle connection auth at the http/2 layer. r=mcmanus 2017-05-11 14:42:05 -07:00
Http2Compression.h Bug 1330907 - Rename Telemetry::ID to Telemetry::HistogramID. r=dexter 2017-02-16 00:45:15 +05:30
Http2HuffmanIncoming.h
Http2HuffmanOutgoing.h
Http2Push.cpp Bug 1334693 - Add origin attributes to Http2Stream::PushHashKey(). r=mcmanus 2017-03-08 18:26:08 +08:00
Http2Push.h Backed out changeset fef09999e003 (bug 1362388) 2017-05-11 18:00:09 +02:00
Http2Session.cpp Backed out changeset fef09999e003 (bug 1362388) 2017-05-11 18:00:09 +02:00
Http2Session.h Bug 136178 - Keep list of weakPtrs instead of streamIds of streams started during 0rtt. r=mcmanus 2017-05-09 11:37:45 +02:00
Http2Stream.cpp Bug 1360236 - make gSocketThread an internal implementation detail of nsSocketTransportService; r=mcmanus 2017-04-27 14:34:42 -04:00
Http2Stream.h Bug 136178 - Keep list of weakPtrs instead of streamIds of streams started during 0rtt. r=mcmanus 2017-05-09 11:37:45 +02:00
HttpAuthUtils.cpp Bug 1351301 - Don't require '.' to accept subdomains in *.auth.trusted-uris preferences. r=valentin 2017-04-06 11:28:00 -04:00
HttpAuthUtils.h Bug 1340486 - Remove duplication of code at nsHttpNegotiate/NTLMAuth::TestPref and MatchesBaseURI r=mayhemer 2017-02-27 17:57:59 +01:00
HttpBaseChannel.cpp Bug 1319111 - Expose 'result principal URI' on LoadInfo as a source for NS_GetFinalChannelURI (removes some use of LOAD_REPLACE flag). r=bz 2017-05-23 08:09:00 -04:00
HttpBaseChannel.h Bug 1319111 - Expose 'result principal URI' on LoadInfo as a source for NS_GetFinalChannelURI (removes some use of LOAD_REPLACE flag). r=bz 2017-05-23 08:09:00 -04:00
HttpChannelChild.cpp Bug 1319111 - Expose 'result principal URI' on LoadInfo as a source for NS_GetFinalChannelURI (removes some use of LOAD_REPLACE flag). r=bz 2017-05-23 08:09:00 -04:00
HttpChannelChild.h Bug 1343745 - Label runnables in /http, r=honzab 2017-04-23 19:59:00 +02:00
HttpChannelParent.cpp Bug 1284579 - Part 2: revise NS_ShouldCheckAppCache. r=valentin 2017-05-04 09:40:00 +08:00
HttpChannelParent.h Bug 1168875 - Part 4: Extend related IPDL and implementation to pass service worker interception timestamps. f=bkelly, r=valentin 2017-04-10 21:13:21 +08:00
HttpChannelParentListener.cpp Bug 1310127 - Part 3: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2017-01-12 17:48:45 +08:00
HttpChannelParentListener.h
HttpInfo.cpp
HttpInfo.h
HttpLog.h
InterceptedChannel.cpp Bug 1359610 - Add telemetry for fetch interception. r=chutten data-r=bsmedberg 2017-05-17 15:42:53 +01:00
InterceptedChannel.h Bug 1359610 - Add telemetry for fetch interception. r=chutten data-r=bsmedberg 2017-05-17 15:42:53 +01:00
NullHttpChannel.cpp Bug 1354349 - Add nsIChannel.isDocument that checks if LOAD_DOCUMENT_URI is set, or if LOAD_HTML_OBJECT_DATA and the channel has the appropriate MIME type r=mcmanus,mystor 2017-04-20 10:15:06 +08:00
NullHttpChannel.h
NullHttpTransaction.cpp Backed out changeset fef09999e003 (bug 1362388) 2017-05-11 18:00:09 +02:00
NullHttpTransaction.h Bug 1312782 - Part 1: Implement window id to pending transactions table. r=honzab 2017-03-27 04:09:00 -04:00
PAltDataOutputStream.ipdl Bug 1363653 - Make AltDataOutputStreamParent not send any messages after object destruction r=mayhemer 2017-05-11 21:35:37 +02:00
PHttpChannel.ipdl Bug 1359005 - Cleanup the use of PBlob in StructuredCloneHolder - part 1 - protocols, r=smaug 2017-05-23 07:49:40 +02:00
PHttpChannelParams.h Bug 1334776 - Store header names into nsHttpHeaderArray. r=mcmanus 2017-04-27 16:48:36 +02:00
PSpdyPush.h
README
TimingStruct.h
TunnelUtils.cpp Backed out changeset fef09999e003 (bug 1362388) 2017-05-11 18:00:09 +02:00
TunnelUtils.h Backed out changeset 379093669b39 (bug 1340655) for warning as err.or at nsHttpConnection.cpp(875). r=backout on a CLOSED TREE 2017-03-01 20:20:57 +01:00
UAOverridesBootstrapper.js Bug 1363421 - Part 2, delay the initialization of UserAgentOverrides.jsm until first nsHttpChannel is created. r=mcmanus 2017-05-16 12:11:12 +08:00
UAOverridesBootstrapper.manifest Bug 1363421 - Part 2, delay the initialization of UserAgentOverrides.jsm until first nsHttpChannel is created. r=mcmanus 2017-05-16 12:11:12 +08:00
UserAgentOverrides.jsm Bug 1363421 - Part 2, delay the initialization of UserAgentOverrides.jsm until first nsHttpChannel is created. r=mcmanus 2017-05-16 12:11:12 +08:00
UserAgentUpdates.jsm Bug 1355056 - replace (function(args) { /* do stuff using this */ }).bind(this) with arrow functions, r=jaws. 2017-04-27 00:25:45 +02:00
WellKnownOpportunisticUtils.js
WellKnownOpportunisticUtils.manifest
http2_huffman_table.txt
make_incoming_tables.py
make_outgoing_tables.py
moz.build Bug 1363421 - Part 2, delay the initialization of UserAgentOverrides.jsm until first nsHttpChannel is created. r=mcmanus 2017-05-16 12:11:12 +08:00
nsAHttpConnection.h Bug 1348061 - When an HTTP channel is throttled, stop reading from the socket when using HTTP/1. r=mcmanus 2017-04-13 05:26:00 -04:00
nsAHttpTransaction.h Backed out changeset fef09999e003 (bug 1362388) 2017-05-11 18:00:09 +02:00
nsCORSListenerProxy.cpp Bug 1343933 - Renaming Principal classes - part 2 - NullPrincipal, r=qdot 2017-03-22 11:38:40 +01:00
nsCORSListenerProxy.h
nsHttp.cpp Bug 1330297 - Part 1: Strip leading or trailing HTTP whitespace for Header value to follow the spec and share code bewteen fetch and XHR. r=baku 2017-04-10 16:15:29 +08:00
nsHttp.h Bug 1345910 - Allow HTTP connection restart for the first connection-based authentication request in a round. r=mcmanus 2017-04-26 17:02:05 +02:00
nsHttpActivityDistributor.cpp Bug 1310127 - Part 2: Use MOZ_MUST_USE in netwerk/protocol/http r=Cykesiopka,mcmanus 2016-12-27 19:05:13 +08:00
nsHttpActivityDistributor.h
nsHttpAtomList.h Bug 1352274 - Add response header indicator for TCP FastOpen suceeded. r=mcmanus 2017-05-04 12:14:54 +02:00
nsHttpAuthCache.cpp Bug 1310127 - Part 3: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2017-01-12 17:48:45 +08:00
nsHttpAuthCache.h
nsHttpAuthManager.cpp
nsHttpAuthManager.h
nsHttpBasicAuth.cpp
nsHttpBasicAuth.h
nsHttpChannel.cpp Bug 1319111 - Expose 'result principal URI' on LoadInfo as a source for NS_GetFinalChannelURI (removes some use of LOAD_REPLACE flag). r=bz 2017-05-23 08:09:00 -04:00
nsHttpChannel.h Bug 1354405 - Add new telemetry probe for bandwidth cost for rcwn, r=michal, valentin, data-r=bsmedberg 2017-05-02 10:08:06 +08:00
nsHttpChannelAuthProvider.cpp Bug 1360574 - Backout original fix to bug 1346392 r=mcmanus 2017-05-11 10:20:14 -07:00
nsHttpChannelAuthProvider.h Bug 1357835 - Extend telemetry for http autentication dialog prompt to show the subresource cross-origin auth dialog prompt per suresource type. Also add a pre to putentially disable auth propts for the cross-origin images. r=mayhemer r=ckerschb r=francois 2017-05-09 12:36:21 +02:00
nsHttpChunkedDecoder.cpp Bug 1310127 - Part 2: Use MOZ_MUST_USE in netwerk/protocol/http r=Cykesiopka,mcmanus 2016-12-27 19:05:13 +08:00
nsHttpChunkedDecoder.h
nsHttpConnection.cpp Bug 1362978 - Remove callbacks on socketInput stream if we cancel a TFO socketTransport. r=mcmanus 2017-05-10 22:54:27 +02:00
nsHttpConnection.h Bug 1360515 - During TCP Fast Open let necko works as it is used to, but only limit amount of data we write to lower layers, i.e. nss, tcpFastOpenLayer, tcp socket. r=mcmanus 2017-05-04 12:15:33 +02:00
nsHttpConnectionInfo.cpp
nsHttpConnectionInfo.h
nsHttpConnectionMgr.cpp Bug 1359490 - add an event loop spinning abstraction function; r=gerald 2017-05-15 09:34:19 -04:00
nsHttpConnectionMgr.h Bug 1362821 - Properly destroy a HalfOpeSocket that is used as a backup for a TFO connection if another H2 connection is established for the same host. r=mcmanus 2017-05-08 18:22:45 +02:00
nsHttpDigestAuth.cpp Bug 1351820 - Build more more netwerk files in unified mode. r=mcmanus 2017-03-31 11:00:10 -07:00
nsHttpDigestAuth.h
nsHttpHandler.cpp Bug 1363421 - Part 2, delay the initialization of UserAgentOverrides.jsm until first nsHttpChannel is created. r=mcmanus 2017-05-16 12:11:12 +08:00
nsHttpHandler.h Bug 1363421 - Part 2, delay the initialization of UserAgentOverrides.jsm until first nsHttpChannel is created. r=mcmanus 2017-05-16 12:11:12 +08:00
nsHttpHeaderArray.cpp Bug 1334776 - Store header names into nsHttpHeaderArray. r=mcmanus 2017-04-27 16:48:36 +02:00
nsHttpHeaderArray.h Bug 1334776 - Store header names into nsHttpHeaderArray. r=mcmanus 2017-04-27 16:48:36 +02:00
nsHttpNTLMAuth.cpp Bug 1344305 - Part 2: Update size calculation for base64 encode in nsHttpNTLMAuth::GenerateCredentials. r=jduell 2017-03-14 18:54:18 -07:00
nsHttpNTLMAuth.h
nsHttpRequestHead.cpp Bug 1334776 - Store header names into nsHttpHeaderArray. r=mcmanus 2017-04-27 16:48:36 +02:00
nsHttpRequestHead.h Bug 1334776 - Store header names into nsHttpHeaderArray. r=mcmanus 2017-04-27 16:48:36 +02:00
nsHttpResponseHead.cpp Bug 1334776 - Store header names into nsHttpHeaderArray. r=mcmanus 2017-04-27 16:48:36 +02:00
nsHttpResponseHead.h Bug 1334776 - Store header names into nsHttpHeaderArray. r=mcmanus 2017-04-27 16:48:36 +02:00
nsHttpTransaction.cpp Backed out changeset a418e4a81c02 (bug 1362388) for build bustage from netwerk/protocol/http/nsHttpChannel.cpp:597 not being declared. r=backout 2017-05-11 18:01:01 +02:00
nsHttpTransaction.h Backed out changeset a418e4a81c02 (bug 1362388) for build bustage from netwerk/protocol/http/nsHttpChannel.cpp:597 not being declared. r=backout 2017-05-11 18:01:01 +02:00
nsICorsPreflightCallback.h
nsIHstsPrimingCallback.idl
nsIHttpActivityObserver.idl
nsIHttpAuthManager.idl
nsIHttpAuthenticableChannel.idl Bug 1360574 - Backout original fix to bug 1346392 r=mcmanus 2017-05-11 10:20:14 -07:00
nsIHttpAuthenticator.idl
nsIHttpChannel.idl Bug 1354349 - Add nsIChannel.isDocument that checks if LOAD_DOCUMENT_URI is set, or if LOAD_HTML_OBJECT_DATA and the channel has the appropriate MIME type r=mcmanus,mystor 2017-04-20 10:15:06 +08:00
nsIHttpChannelAuthProvider.idl
nsIHttpChannelChild.idl
nsIHttpChannelInternal.idl Bug 1324419 - Use QueryObject for nsHttpChannel. r=mcmanus 2017-02-17 08:08:00 -05:00
nsIHttpEventSink.idl
nsIHttpHeaderVisitor.idl
nsIHttpProtocolHandler.idl
nsIRaceCacheWithNetwork.idl Bug 1325081 - Add interface to delay the cache fetch in order to test network-cache racing of HTTP requests r=michal 2017-02-15 20:44:09 +01:00
nsIWellKnownOpportunisticUtils.idl

README

                                                        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>