gecko-dev/netwerk/protocol/http
Yoshi Huang 7652396698 Bug 1284579 - Part 2: revise NS_ShouldCheckAppCache. r=valentin
There's one redudant NS_ShouldCheckAppCache(nsIURI*, bool) is not used
anymore. Also we remove the extra usePrivateBrowsing argument, since we
can get this information from nsIPrincipal.
2017-05-04 09:40:00 +08: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
AltDataOutputStreamChild.h
AltDataOutputStreamParent.cpp Bug 1359106 - Make sure AltDataOutputStreamParent::SendError is not called after ActorDestroy r=bagder 2017-04-30 18:08:25 +02:00
AltDataOutputStreamParent.h Bug 1359106 - Make sure AltDataOutputStreamParent::SendError is not called after ActorDestroy r=bagder 2017-04-30 18:08:25 +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 Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
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 Bug 1313595 - Lower HSTS priming timeout r=mayhemer 2016-12-08 11:07:55 -10:00
Http2Compression.cpp Bug 1360236 - make gSocketThread an internal implementation detail of nsSocketTransportService; r=mcmanus 2017-04-27 14:34:42 -04:00
Http2Compression.h Bug 1330907 - Rename Telemetry::ID to Telemetry::HistogramID. r=dexter 2017-02-16 00:45:15 +05:30
Http2HuffmanIncoming.h Bug 1337230: Tweak the const-ness on the HTTP2 Huffman tables. r=hurley 2017-02-08 16:34:58 +13:00
Http2HuffmanOutgoing.h Bug 1337230: Tweak the const-ness on the HTTP2 Huffman tables. r=hurley 2017-02-08 16:34:58 +13:00
Http2Push.cpp Bug 1334693 - Add origin attributes to Http2Stream::PushHashKey(). r=mcmanus 2017-03-08 18:26:08 +08:00
Http2Push.h Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
Http2Session.cpp Bug 1360236 - make gSocketThread an internal implementation detail of nsSocketTransportService; r=mcmanus 2017-04-27 14:34:42 -04:00
Http2Session.h Backed out changeset b29865f8d36b (bug 1356611) for frequent windows xpcshell failures a=backout 2017-04-15 00:32:29 -07: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 1334693 - Add origin attributes to Http2Stream::PushHashKey(). r=mcmanus 2017-03-08 18:26:08 +08: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 Backed out changeset 88c2a0b2dde5 (bug 1319111) for crashing Talos. r=backout 2017-04-28 00:16:39 +02:00
HttpBaseChannel.h Backed out changeset 88c2a0b2dde5 (bug 1319111) for crashing Talos. r=backout 2017-04-28 00:16:39 +02:00
HttpChannelChild.cpp Backed out changeset 88c2a0b2dde5 (bug 1319111) for crashing Talos. r=backout 2017-04-28 00:16:39 +02: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 Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
HttpInfo.cpp
HttpInfo.h
HttpLog.h
InterceptedChannel.cpp Bug 1168875 - Part 2: Add service worker interception timestamp logging APIs to nsIInterceptedChannel. f=bkelly, r=valentin 2017-04-10 21:13:21 +08:00
InterceptedChannel.h Bug 1168875 - Part 2: Add service worker interception timestamp logging APIs to nsIInterceptedChannel. f=bkelly, r=valentin 2017-04-10 21:13:21 +08: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 Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
NullHttpTransaction.cpp Bug 1341572 - Fix multiple HalfOpen socket for a single transaction. r=mcmanus 2017-03-17 09:00:50 +01: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
PHttpChannel.ipdl Bug 1348461 - Use a process-unique uint64 instead of a uuid for channel ids r=mcmanus 2017-04-04 08:36:51 -07:00
PHttpChannelParams.h Bug 1334776 - Store header names into nsHttpHeaderArray. r=mcmanus 2017-04-27 16:48:36 +02:00
PSpdyPush.h Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
README
TimingStruct.h
TunnelUtils.cpp Bug 1360236 - make gSocketThread an internal implementation detail of nsSocketTransportService; r=mcmanus 2017-04-27 14:34:42 -04: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
UserAgentOverrides.jsm Bug 1356569 - Remove addObserver's last parameter when it is false, r=jaws. 2017-04-14 21:51:38 +02: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 Bug 1337230: Tweak the const-ness on the HTTP2 Huffman tables. r=hurley 2017-02-08 16:34:58 +13:00
make_outgoing_tables.py Bug 1337230: Tweak the const-ness on the HTTP2 Huffman tables. r=hurley 2017-02-08 16:34:58 +13:00
moz.build Backed out changeset 5a9277de75b3 (bug 1188435) for test failures in test_devtools_serviceworker_interception.html | undefined assertion name 2017-04-25 16:32:26 +02: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 5a9277de75b3 (bug 1188435) for test failures in test_devtools_serviceworker_interception.html | undefined assertion name 2017-04-25 16:32:26 +02:00
nsCORSListenerProxy.cpp Bug 1343933 - Renaming Principal classes - part 2 - NullPrincipal, r=qdot 2017-03-22 11:38:40 +01:00
nsCORSListenerProxy.h Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
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 1074642 - When multiple HSTS headers are received, only consider the first. r=keeler,mcmanus 2017-04-20 10:03:53 -04: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 Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
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 Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
nsHttpBasicAuth.cpp
nsHttpBasicAuth.h
nsHttpChannel.cpp Backed out changeset 88c2a0b2dde5 (bug 1319111) for crashing Talos. r=backout 2017-04-28 00:16:39 +02:00
nsHttpChannel.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
nsHttpChannelAuthProvider.cpp 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
nsHttpChannelAuthProvider.h Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08: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 Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
nsHttpConnection.cpp Bug 1360236 - make gSocketThread an internal implementation detail of nsSocketTransportService; r=mcmanus 2017-04-27 14:34:42 -04:00
nsHttpConnection.h Backed out changeset 5a9277de75b3 (bug 1188435) for test failures in test_devtools_serviceworker_interception.html | undefined assertion name 2017-04-25 16:32:26 +02:00
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 1354796 - Close unconnected HTTP connection with NS_ERROR_NET_TIMEOUT after 90s timeout. r=mcmanus 2017-05-03 08:31:00 -04:00
nsHttpConnectionMgr.h Bug 1355539 - Insert blocking transactions in the front of pendingQ, r=mayhemer 2017-05-02 00:30:00 +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 Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
nsHttpHandler.cpp Bug 1360236 - make gSocketThread an internal implementation detail of nsSocketTransportService; r=mcmanus 2017-04-27 14:34:42 -04:00
nsHttpHandler.h Bug 1360236 - make gSocketThread an internal implementation detail of nsSocketTransportService; r=mcmanus 2017-04-27 14:34:42 -04: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 Bug 1360236 - make gSocketThread an internal implementation detail of nsSocketTransportService; r=mcmanus 2017-04-27 14:34:42 -04:00
nsHttpTransaction.h Bug 1359496 - Remove code added in bug 1340164. This code was taking care that we do not send multiple socket status events. r=mcmanus 2017-04-27 16:37:31 +02:00
nsICorsPreflightCallback.h
nsIHstsPrimingCallback.idl Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
nsIHttpActivityObserver.idl Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
nsIHttpAuthManager.idl Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
nsIHttpAuthenticableChannel.idl 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
nsIHttpAuthenticator.idl Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
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 Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
nsIHttpChannelChild.idl Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
nsIHttpChannelInternal.idl Bug 1324419 - Use QueryObject for nsHttpChannel. r=mcmanus 2017-02-17 08:08:00 -05:00
nsIHttpEventSink.idl Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
nsIHttpHeaderVisitor.idl Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
nsIHttpProtocolHandler.idl Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00
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 Bug 1310127 - Part 1: Use MOZ_MUST_USE in netwerk/protocol/http r=mcmanus 2016-12-27 15:22:07 +08:00

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>