gecko/netwerk/protocol/http
Valentin Gosu 0b5365fffa Bug 786419 - Part 8 - Several improvements to per-app-offline behaviour r=jduell
Make GetAppId() pure-virtual and add implementation for TCPSocketParent, UDPSocketParent, and one for Necko parent that returns UNKNOWN_APP_ID
Change nsIOService to use IsNeckoChild instead of XRE_ method.
Include nsThreadUtils.h (for nsRunnable and dispatchToMainThread) and NeckoCommon for IsNeckoChild.
Make HttpChannelParent set LOAD_ONLY_FROM_CACHE, LOAD_FROM_CACHE and LOAD_NO_NETWORK_IO when offline.
2014-08-22 20:15:00 +03:00
..
ASpdySession.cpp Bug 1046915 - Pref to advertise the latest HTTP/2 draft as "h2". r=mcmanus 2014-09-23 10:49:13 -07:00
ASpdySession.h Backed out changeset 0a066b7ffa46 (bug 939318) 2014-09-24 16:17:32 +01:00
ConnectionDiagnostics.cpp
http2_huffman_table.txt
Http2Compression.cpp Bug 1054173 - Do not fail connections when receiving request headers. r=mcmanus 2014-08-18 14:59:32 -07:00
Http2Compression.h Bug 1054173 - Do not fail connections when receiving request headers. r=mcmanus 2014-08-18 14:59:32 -07:00
Http2HuffmanIncoming.h
Http2HuffmanOutgoing.h
Http2Push.cpp
Http2Push.h
Http2Session.cpp Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
Http2Session.h Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
Http2Stream.cpp Bug 1046915 - Pref to advertise the latest HTTP/2 draft as "h2". r=mcmanus 2014-09-23 10:49:13 -07:00
Http2Stream.h
HttpBaseChannel.cpp Bug 1064706 - Move nsHttpChannel::GetPerformance to HttpBaseChannel so it can be used in HttpChannelChild r=honzab 2014-10-06 14:33:13 +03:00
HttpBaseChannel.h Bug 1064706 - Move nsHttpChannel::GetPerformance to HttpBaseChannel so it can be used in HttpChannelChild r=honzab 2014-10-06 14:33:13 +03:00
HttpChannelChild.cpp Bug 1064706 - Send timing info to content process r=honzab 2014-10-06 14:33:27 +03:00
HttpChannelChild.h Bug 1064706 - Send timing info to content process r=honzab 2014-10-06 14:33:27 +03:00
HttpChannelParent.cpp Bug 786419 - Part 8 - Several improvements to per-app-offline behaviour r=jduell 2014-08-22 20:15:00 +03:00
HttpChannelParent.h Bug 786419 - Part 1 - Provide way to "set network offline" per app r=jduell 2014-08-23 06:05:56 +03:00
HttpChannelParentListener.cpp
HttpChannelParentListener.h
HttpInfo.cpp
HttpInfo.h
HttpLog.h Backed out 5 changesets (bug 806819) for WinXP test failures on a CLOSED TREE 2014-10-06 16:32:50 -07:00
make_incoming_tables.py
make_outgoing_tables.py
moz.build Backed out 5 changesets (bug 806819) for WinXP test failures on a CLOSED TREE 2014-10-06 16:32:50 -07:00
nsAHttpConnection.h Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsAHttpTransaction.h Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsHttp.cpp Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsHttp.h Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsHttpActivityDistributor.cpp
nsHttpActivityDistributor.h
nsHttpAtomList.h Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsHttpAuthCache.cpp
nsHttpAuthCache.h
nsHttpAuthManager.cpp
nsHttpAuthManager.h
nsHttpBasicAuth.cpp
nsHttpBasicAuth.h
nsHttpChannel.cpp Bug 786419 - Part 1 - Provide way to "set network offline" per app r=jduell 2014-08-23 06:05:56 +03:00
nsHttpChannel.h Bug 1064706 - Move nsHttpChannel::GetPerformance to HttpBaseChannel so it can be used in HttpChannelChild r=honzab 2014-10-06 14:33:13 +03:00
nsHttpChannelAuthProvider.cpp
nsHttpChannelAuthProvider.h
nsHttpChunkedDecoder.cpp
nsHttpChunkedDecoder.h
nsHttpConnection.cpp Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsHttpConnection.h Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsHttpConnectionInfo.cpp Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsHttpConnectionInfo.h Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsHttpConnectionMgr.cpp Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsHttpConnectionMgr.h Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsHttpDigestAuth.cpp
nsHttpDigestAuth.h
nsHttpHandler.cpp Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsHttpHandler.h Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsHttpHeaderArray.cpp
nsHttpHeaderArray.h
nsHttpNTLMAuth.cpp
nsHttpNTLMAuth.h
nsHttpPipeline.cpp
nsHttpPipeline.h
nsHttpRequestHead.cpp Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsHttpRequestHead.h Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsHttpResponseHead.cpp
nsHttpResponseHead.h
nsHttpTransaction.cpp Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsHttpTransaction.h Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
nsIHttpActivityObserver.idl
nsIHttpAuthenticableChannel.idl
nsIHttpAuthenticator.idl
nsIHttpAuthManager.idl
nsIHttpChannel.idl Bug 1048579 - Update the nsIChannel UUID. rs=Ms2ger 2014-08-25 09:55:57 -04:00
nsIHttpChannelAuthProvider.idl
nsIHttpChannelChild.idl
nsIHttpChannelInternal.idl
nsIHttpEventSink.idl
nsIHttpHeaderVisitor.idl
nsIHttpProtocolHandler.idl
NullHttpTransaction.cpp Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
NullHttpTransaction.h Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
PHttpChannel.ipdl Bug 1064706 - Send timing info to content process r=honzab 2014-10-06 14:33:27 +03:00
PHttpChannelParams.h
PSpdyPush.h
README
SpdyPush3.cpp
SpdyPush3.h
SpdyPush31.cpp
SpdyPush31.h
SpdySession3.cpp Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
SpdySession3.h Backed out changeset 0a066b7ffa46 (bug 939318) 2014-09-24 16:17:32 +01:00
SpdySession31.cpp Backed out 2 changesets (bug 1003448) since their dependency was backed out 2014-10-04 20:10:19 -07:00
SpdySession31.h Backed out changeset 0a066b7ffa46 (bug 939318) 2014-09-24 16:17:32 +01:00
SpdyStream3.cpp
SpdyStream3.h
SpdyStream31.cpp
SpdyStream31.h
SpdyZlibReporter.cpp
SpdyZlibReporter.h Bug 1075984 - SpdyZlibReporter.h is missing an include guard. r=froydnj 2014-10-01 13:57:18 -07:00
TimingStruct.h Bug 1064706 - Send timing info to content process r=honzab 2014-10-06 14:33:27 +03:00
TunnelUtils.cpp Bug 951677 - Part 1: Add Bind function to SocketTransport. r=honzab 2014-10-07 17:24:57 +08:00
TunnelUtils.h
UserAgentOverrides.jsm
UserAgentUpdates.jsm

                                                        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>