gecko/netwerk/protocol/http
2013-09-17 12:38:55 -04:00
..
ASpdySession.cpp
ASpdySession.h
ConnectionDiagnostics.cpp
HttpBaseChannel.cpp Bug 910989. Remove nsTHashtable::Init, fallible allocation, and MT hashtables. r=ehsan,bsmedberg 2013-09-02 20:41:57 +12:00
HttpBaseChannel.h bug 897503 - part 2 use smart pointers for nsHttpHandler references r=sworkman 2013-08-13 15:36:58 -04:00
HttpChannelChild.cpp
HttpChannelChild.h
HttpChannelParent.cpp bug 897503 - part 1 - HttpChannelParent reference count bug of nsHttpHandler r=sworkman 2013-08-13 15:36:56 -04:00
HttpChannelParent.h bug 897503 - part 1 - HttpChannelParent reference count bug of nsHttpHandler r=sworkman 2013-08-13 15:36:56 -04:00
HttpChannelParentListener.cpp
HttpChannelParentListener.h
HttpInfo.cpp
HttpInfo.h
HttpLog.h
Makefile.in Bug 912293 - Remove now redundant boilerplate from Makefile.in. r=gps 2013-09-05 09:01:46 +09:00
moz.build Bug 897221 - Add UserAgentUpdates.jsm; r=fabrice 2013-09-09 15:47:47 -04:00
nsAHttpConnection.h
nsAHttpTransaction.h
nsHttp.cpp
nsHttp.h
nsHttpActivityDistributor.cpp Bug 884061 - Part 3q: Use NS_DECL_THREADSAFE_ISUPPORTS in netwerk/, r=macmanus 2013-07-18 21:24:13 -05:00
nsHttpActivityDistributor.h Bug 884061 - Part 3q: Use NS_DECL_THREADSAFE_ISUPPORTS in netwerk/, r=macmanus 2013-07-18 21:24:13 -05:00
nsHttpAtomList.h
nsHttpAuthCache.cpp Bug 901820 - Part 1. replace nsCRT::strdup with strdup. r=bsmedberg 2013-08-22 19:31:48 +09:00
nsHttpAuthCache.h
nsHttpAuthManager.cpp
nsHttpAuthManager.h
nsHttpBasicAuth.cpp
nsHttpBasicAuth.h
nsHttpChannel.cpp bug 910518 - check httpchannel for listener release on redirect callback r=jduell 2013-09-05 16:20:15 -04:00
nsHttpChannel.h
nsHttpChannelAuthProvider.cpp bug 897503 - part 2 use smart pointers for nsHttpHandler references r=sworkman 2013-08-13 15:36:58 -04:00
nsHttpChannelAuthProvider.h bug 897503 - part 2 use smart pointers for nsHttpHandler references r=sworkman 2013-08-13 15:36:58 -04:00
nsHttpChunkedDecoder.cpp
nsHttpChunkedDecoder.h
nsHttpConnection.cpp Bug 917266 - Remove some unneeded code in netwerk/; r=mcmanus 2013-09-17 12:38:55 -04:00
nsHttpConnection.h bug 907800 - only retry http 408 when it is suspected of being a persistent reuse race r=jduell 2013-09-04 16:39:25 -04:00
nsHttpConnectionInfo.cpp
nsHttpConnectionInfo.h Bug 884061 - Part 3q: Use NS_DECL_THREADSAFE_ISUPPORTS in netwerk/, r=macmanus 2013-07-18 21:24:13 -05:00
nsHttpConnectionMgr.cpp Bug 917266 - Remove some unneeded code in netwerk/; r=mcmanus 2013-09-17 12:38:55 -04:00
nsHttpConnectionMgr.h bug 907960 - backout 905460 r=backout 2013-08-21 21:01:19 -04:00
nsHttpDigestAuth.cpp
nsHttpDigestAuth.h
nsHttpHandler.cpp Bug 917266 - Remove some unneeded code in netwerk/; r=mcmanus 2013-09-17 12:38:55 -04:00
nsHttpHandler.h bug 907960 - backout 905460 r=backout 2013-08-21 21:01:19 -04:00
nsHttpHeaderArray.cpp
nsHttpHeaderArray.h
nsHttpNTLMAuth.cpp Bug 887984 - Send telemetry data from NTLM Init() methods. r=honzab 2013-07-25 09:54:11 -07:00
nsHttpNTLMAuth.h
nsHttpPipeline.cpp bug 907960 - backout 905460 r=backout 2013-08-21 21:01:19 -04:00
nsHttpPipeline.h bug 907960 - backout 905460 r=backout 2013-08-21 21:01:19 -04:00
nsHttpRequestHead.cpp
nsHttpRequestHead.h
nsHttpResponseHead.cpp
nsHttpResponseHead.h
nsHttpTransaction.cpp bug 907960 - backout 905460 r=backout 2013-08-21 21:01:19 -04:00
nsHttpTransaction.h bug 907960 - backout 905460 r=backout 2013-08-21 21:01:19 -04:00
nsIHttpActivityObserver.idl
nsIHttpAuthenticableChannel.idl
nsIHttpAuthenticator.idl
nsIHttpAuthManager.idl
nsIHttpChannel.idl
nsIHttpChannelAuthProvider.idl
nsIHttpChannelChild.idl
nsIHttpChannelInternal.idl Bug 846918: add hsts message queue to httpchannel. r=bsmith. 2013-07-26 08:37:03 -07:00
nsIHttpEventSink.idl
nsIHttpHeaderVisitor.idl
nsIHttpProtocolHandler.idl
NullHttpTransaction.cpp Bug 884061 - Part 3q: Use NS_DECL_THREADSAFE_ISUPPORTS in netwerk/, r=macmanus 2013-07-18 21:24:13 -05:00
NullHttpTransaction.h Bug 884061 - Part 3q: Use NS_DECL_THREADSAFE_ISUPPORTS in netwerk/, r=macmanus 2013-07-18 21:24:13 -05:00
PHttpChannel.ipdl
PHttpChannelParams.h
PSpdyPush3.h
README
SpdyPush3.cpp Bug 910989. Remove nsTHashtable::Init, fallible allocation, and MT hashtables. r=ehsan,bsmedberg 2013-09-02 20:41:57 +12:00
SpdyPush3.h Bug 884061 - Part 3q: Use NS_DECL_THREADSAFE_ISUPPORTS in netwerk/, r=macmanus 2013-07-18 21:24:13 -05:00
SpdySession2.cpp Bug 910989. Remove nsTHashtable::Init, fallible allocation, and MT hashtables. r=ehsan,bsmedberg 2013-09-02 20:41:57 +12:00
SpdySession2.h Bug 884061 - Part 3q: Use NS_DECL_THREADSAFE_ISUPPORTS in netwerk/, r=macmanus 2013-07-18 21:24:13 -05:00
SpdySession3.cpp Bug 910989. Remove nsTHashtable::Init, fallible allocation, and MT hashtables. r=ehsan,bsmedberg 2013-09-02 20:41:57 +12:00
SpdySession3.h Bug 902082 - Forward-declare PSpdyPush3 in nsILoadGroup.h; r=mcmanus 2013-08-07 15:01:40 -04:00
SpdyStream2.cpp Bug 910989. Remove nsTHashtable::Init, fallible allocation, and MT hashtables. r=ehsan,bsmedberg 2013-09-02 20:41:57 +12:00
SpdyStream2.h
SpdyStream3.cpp Bug 910989. Remove nsTHashtable::Init, fallible allocation, and MT hashtables. r=ehsan,bsmedberg 2013-09-02 20:41:57 +12:00
SpdyStream3.h
TimingStruct.h
UserAgentOverrides.jsm Bug 897221 - Initialize UserAgentUpdates.jsm inside UserAgentOverrides; r=fabrice 2013-09-09 15:47:47 -04:00
UserAgentUpdates.jsm Bug 897221 - Schedule in main process and notify content processes of updates for B2G; r=fabrice 2013-09-09 15:47:47 -04:00

                                                        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>