gecko-dev/netwerk/protocol/http
Valentin Gosu f96bb4a629 Bug 1423495 - Part6: Use threadsafe refcounting for nsServerTiming r=baku,nwgh
* Also keeps the timing array as nsTArray<nsCOMPtr<nsIServerTiming>> instead of the scriptable nsIArray (which doesn't like being released on another thread)

MozReview-Commit-ID: 37uPZJ38saQ

--HG--
extra : rebase_source : 099ec74c3032ef6033d187a028466777200c6015
2018-04-24 13:04:12 +02:00
..
AltDataOutputStreamChild.cpp
AltDataOutputStreamChild.h
AltDataOutputStreamParent.cpp Bug 1369044 - Change assertion to handle call failure r=michal 2017-06-19 16:55:12 +02:00
AltDataOutputStreamParent.h
AlternateServices.cpp Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
AlternateServices.h Bug 1444490 Declare classses (and one method) in network/ final to reduce virtual function calls r=nwgh 2018-03-09 08:37:18 -06:00
ASpdySession.cpp Bug 1368080 - Only remove pushed streams from cache when canceling the stream if the ids match. r=mcmanus 2017-06-28 10:29:34 -07:00
ASpdySession.h Bug 1436263 - Part 2: Replace override final virtual function specifiers with just final. r=froydnj 2018-02-05 22:50:00 -08:00
BackgroundChannelRegistrar.cpp
BackgroundChannelRegistrar.h
CacheControlParser.cpp
CacheControlParser.h
ConnectionDiagnostics.cpp Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj 2017-07-26 16:03:57 -04:00
http2_huffman_table.txt
Http2Compression.cpp Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
Http2Compression.h Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
Http2HuffmanIncoming.h
Http2HuffmanOutgoing.h
Http2Push.cpp Bug 1377208 - Move background h2 stream into background group. r=hurley 2017-08-30 02:19:00 -04:00
Http2Push.h Bug 1409570 - Ensure a pushed stream knows we've reached EOS. r=mcmanus 2017-10-18 12:34:42 -07:00
Http2Session.cpp Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
Http2Session.h Bug 1436263 - Part 2: Replace override final virtual function specifiers with just final. r=froydnj 2018-02-05 22:50:00 -08:00
Http2Stream.cpp Bug 1435671 - Reduce binary size by making NS_MutateURI.Apply not be a templated method r=mayhemer 2018-02-21 01:00:54 +01:00
Http2Stream.h Bug 1416529 r=mcmanus 2018-02-09 09:22:18 -08:00
HttpAuthUtils.cpp Bug 1410794 (attempt 2) - Change some |string| occurrences in nsIPrefBranch.idl to |ACString|. r=erahm. 2017-10-27 10:30:33 +11:00
HttpAuthUtils.h
HttpBackgroundChannelChild.cpp Bug 1413999 - Part3: IPC part, send trailers to child process r=dragana 2018-01-03 02:05:00 +02:00
HttpBackgroundChannelChild.h Bug 1413999 - Part3: IPC part, send trailers to child process r=dragana 2018-01-03 02:05:00 +02:00
HttpBackgroundChannelParent.cpp Bug 1413999 - Part3: IPC part, send trailers to child process r=dragana 2018-01-03 02:05:00 +02:00
HttpBackgroundChannelParent.h Bug 1413999 - Part3: IPC part, send trailers to child process r=dragana 2018-01-03 02:05:00 +02:00
HttpBaseChannel.cpp Bug 1423495 - Part6: Use threadsafe refcounting for nsServerTiming r=baku,nwgh 2018-04-24 13:04:12 +02:00
HttpBaseChannel.h Bug 1423495 - Part4: Create doc entry form http channel if server timing headers are found for a document load r=baku 2018-01-12 03:13:00 +01:00
HttpChannelChild.cpp Bug 1423495 - Part4: Create doc entry form http channel if server timing headers are found for a document load r=baku 2018-01-12 03:13:00 +01:00
HttpChannelChild.h Bug 1443379 - Stop pretending cacheKey can be anything other than uint32_t, r=smaug 2018-04-10 17:49:46 -04:00
HttpChannelParent.cpp Bug 1443379 - Stop pretending cacheKey can be anything other than uint32_t, r=smaug 2018-04-10 17:49:46 -04:00
HttpChannelParent.h Bug 1334465 - Make HttpChannelParent::mIPCClosed atomic r=bagder 2018-02-09 13:20:04 +01:00
HttpChannelParentListener.cpp Bug 1431847 P5 Perform service worker interception in the parent if ServiceWorkerParentInterceptEnable() returns true. r=asuth 2018-01-24 12:47:16 -05:00
HttpChannelParentListener.h Bug 1431847 P5 Perform service worker interception in the parent if ServiceWorkerParentInterceptEnable() returns true. r=asuth 2018-01-24 12:47:16 -05:00
HttpInfo.cpp
HttpInfo.h
HttpLog.h Bug 1445796 - Add logging of a calling JS script to more http channel methods. r=valentin 2018-03-16 09:28:00 -04:00
InterceptedChannel.cpp Bug 1450874 P2 Don't save service worker time stamps if the fetch event didn't actually dispatch. r=asuth 2018-04-03 19:53:21 -07:00
InterceptedChannel.h Bug 1350359 - Part 3: Place the alternative data to the InterceptedChannel. r=bkelly 2017-12-04 14:39:21 +08:00
InterceptedHttpChannel.cpp Bug 1423495 - Part4: Create doc entry form http channel if server timing headers are found for a document load r=baku 2018-01-12 03:13:00 +01:00
InterceptedHttpChannel.h Backed out 6 changesets (bug 1416879) for bc permafailures on windows on browser_multie10s_update.js r=backout a=backout 2018-01-07 11:55:44 +02:00
make_incoming_tables.py
make_outgoing_tables.py
moz.build Bug 1429830 - Enable TFO is a cross-compiler is used.r=nwgh 2018-01-11 23:17:44 +01:00
nsAHttpConnection.h Bug 1377208 - Move background h2 stream into background group. r=hurley 2017-08-30 02:19:00 -04:00
nsAHttpTransaction.h Bug 1367861 - enable throttling for http/2. r=mayhemer 2018-01-10 13:35:02 -08:00
nsCORSListenerProxy.cpp Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
nsCORSListenerProxy.h Bug 1443079 - nsScriptError.isFromPrivateWindow must match the correct value also in e10s mode, r=smaug 2018-03-13 06:40:38 +01:00
nsHttp.cpp Bug 1433088 - Make the HTTP cache entry age based validation calculation work with the internal one-second only round-down resolution to make max-age=0 force immediate expiration. r=michal 2018-03-28 08:35:00 -04:00
nsHttp.h bug 1434852 - introducing TRR (DOH); r=mcmanus,valentin 2018-02-01 10:20:49 +01:00
nsHttpActivityDistributor.cpp Bug 1372405 - Provide names for all runnables in the tree (r=froydnj) 2017-06-26 14:19:58 -07:00
nsHttpActivityDistributor.h
nsHttpAtomList.h Bug 1413999 Part2: Take http trailers from chunk decoder and add serverTiming attribute in nsITimedChannel r=dragana 2018-01-03 02:04:00 +02:00
nsHttpAuthCache.cpp Bug 1442756 - Switch nsHttpAuthCache::mDB to nsClassHashtable. r=mayhemer 2018-03-02 15:04:25 -08:00
nsHttpAuthCache.h Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
nsHttpAuthManager.cpp Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
nsHttpAuthManager.h
nsHttpBasicAuth.cpp Bug 1419658 - let Basic http auth support ISO-8859-1 user/password, r=honzab 2017-12-07 01:31:00 +02:00
nsHttpBasicAuth.h
nsHttpChannel.cpp Bug 1423495 - Part4: Create doc entry form http channel if server timing headers are found for a document load r=baku 2018-01-12 03:13:00 +01:00
nsHttpChannel.h Bug 1453387: Add network load status reports to gecko-profiler markers r=mstange 2018-04-19 23:32:17 -04:00
nsHttpChannelAuthProvider.cpp Bug 1436655 - Introduce a mechanism for VarCache prefs to be defined entirely in the binary. r=glandium 2018-03-26 09:39:40 +11:00
nsHttpChannelAuthProvider.h Bug 1436655 - Introduce a mechanism for VarCache prefs to be defined entirely in the binary. r=glandium 2018-03-26 09:39:40 +11:00
nsHttpChunkedDecoder.cpp Bug 1413999 Part2: Take http trailers from chunk decoder and add serverTiming attribute in nsITimedChannel r=dragana 2018-01-03 02:04:00 +02:00
nsHttpChunkedDecoder.h Bug 1413999 Part2: Take http trailers from chunk decoder and add serverTiming attribute in nsITimedChannel r=dragana 2018-01-03 02:04:00 +02:00
nsHttpConnection.cpp Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
nsHttpConnection.h Bug 1363284 - HTTP/2 anonymous/onymous session (connection) coalescing, r=mayhemer 2018-02-15 09:10:00 +02:00
nsHttpConnectionInfo.cpp bug 1444532 - fix a leak in SHA256 in nsHttpConnectionInfo.cpp r=mayhemer 2018-03-09 14:16:57 -08:00
nsHttpConnectionInfo.h Bug 1444490 Declare classses (and one method) in network/ final to reduce virtual function calls r=nwgh 2018-03-09 08:37:18 -06:00
nsHttpConnectionMgr.cpp Bug 1452028 - Bring back network.http.fast-fallback-to-IPv4 preference, regression from bug 1430659. r=valentin 2018-04-13 10:04:00 -04:00
nsHttpConnectionMgr.h Bug 1430659 - Network requests in "blocked" state for long time (1+ minute) when ipv6 hosts are no longer available. r=valentin 2018-03-16 09:06:00 -04:00
nsHttpDigestAuth.cpp Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu 2017-07-29 20:50:21 +09:00
nsHttpDigestAuth.h Bug 1374580 (part 2) - Remove nsAFlat{,C}String typedefs. r=froydnj. 2017-06-20 19:19:05 +10:00
nsHttpHandler.cpp Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
nsHttpHandler.h Bug 1430659 - Network requests in "blocked" state for long time (1+ minute) when ipv6 hosts are no longer available. r=valentin 2018-03-16 09:06:00 -04:00
nsHttpHeaderArray.cpp
nsHttpHeaderArray.h
nsHttpNTLMAuth.cpp Bug 1411001 - Remove the +x permissions on cpp & h files r=froydnj 2017-10-23 20:59:55 +02:00
nsHttpNTLMAuth.h Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
nsHttpRequestHead.cpp Bug 870698 - Part 6: Replace Append(NS_LITERAL_CSTRING("")) with AppendLiteral(""). r=erahm 2017-09-07 18:25:25 -07:00
nsHttpRequestHead.h Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj. 2017-06-20 19:19:52 +10:00
nsHttpResponseHead.cpp
nsHttpResponseHead.h
nsHttpTransaction.cpp Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
nsHttpTransaction.h Bug 1436263 - Part 1: Replace final override virtual function specifiers with just final. r=froydnj 2018-02-05 22:46:57 -08:00
nsIBackgroundChannelRegistrar.idl
nsICorsPreflightCallback.h
nsIHttpActivityObserver.idl
nsIHttpAuthenticableChannel.idl
nsIHttpAuthenticator.idl
nsIHttpAuthManager.idl
nsIHttpChannel.idl Bug 1149250 add support for https upgrades from webextensions, r=bz,mayhemer,rpl 2017-12-08 12:12:37 -08:00
nsIHttpChannelAuthProvider.idl
nsIHttpChannelChild.idl
nsIHttpChannelInternal.idl Bug 1426353 - Do not allow the parent process to consume alt-data generated in the content process. r=michal 2018-03-06 02:44:51 +01:00
nsIHttpHeaderVisitor.idl
nsIHttpProtocolHandler.idl Bug 1399300 - Backed out changeset a51cf9c048a1 (bug 910207) a=backout 2017-09-13 10:51:18 +02:00
nsIRaceCacheWithNetwork.idl
nsIWellKnownOpportunisticUtils.idl
nsServerTiming.cpp Bug 1413999 Part2: Take http trailers from chunk decoder and add serverTiming attribute in nsITimedChannel r=dragana 2018-01-03 02:04:00 +02:00
nsServerTiming.h Bug 1423495 - Part6: Use threadsafe refcounting for nsServerTiming r=baku,nwgh 2018-04-24 13:04:12 +02:00
NullHttpChannel.cpp Bug 1423495 - Part6: Use threadsafe refcounting for nsServerTiming r=baku,nwgh 2018-04-24 13:04:12 +02:00
NullHttpChannel.h
NullHttpTransaction.cpp Bug 1412260 - Initialize mFastOpenStatus in NullHttpTransaction. r=bagder 2017-10-27 14:05:31 +02:00
NullHttpTransaction.h Bug 1436263 - Part 2: Replace override final virtual function specifiers with just final. r=froydnj 2018-02-05 22:50:00 -08:00
PAltDataOutputStream.ipdl
PHttpBackgroundChannel.ipdl Bug 1413999 - Part3: IPC part, send trailers to child process r=dragana 2018-01-03 02:05:00 +02:00
PHttpChannel.ipdl Bug 1438935 - Serialize selected LoadInfo properties from HTTPChannelParent to HTTPChannelChild through OnStartRequest and Redirect1Begin, r=asuth 2018-03-06 08:07:00 +02:00
PHttpChannelParams.h
PSpdyPush.h Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj 2017-08-16 16:48:52 -07:00
README
TimingStruct.h Bug 1384679 - Fix timing for TFO. r=mcmanus r=honza 2017-10-17 15:28:33 +02:00
TunnelUtils.cpp Backed out 4 changesets (bug 525063) on request from Andi. a=backout 2018-04-13 16:01:28 +03:00
TunnelUtils.h Bug 1436263 - Part 2: Replace override final virtual function specifiers with just final. r=froydnj 2018-02-05 22:50:00 -08:00
UAOverridesBootstrapper.js Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
UAOverridesBootstrapper.manifest
UserAgentOverrides.jsm Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
UserAgentUpdates.jsm Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
WellKnownOpportunisticUtils.js Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian 2018-02-06 09:36:57 -08:00
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>