RetroZilla/netwerk/protocol/http/src
roytam1 ba7f53c261 import patches from thunderbird-2.0.0.24-28.el5_7.src.rpm, with following backed out due to broken build:
mozilla-573873-1.8.patch
mozilla-liveconnect-1.9.2.13.patch
mozilla-nsTArray.patch
2018-05-01 18:45:19 +08:00
..
Makefile.in first commit 2015-10-20 23:03:22 -04:00
nsAHttpConnection.h first commit 2015-10-20 23:03:22 -04:00
nsAHttpTransaction.h first commit 2015-10-20 23:03:22 -04:00
nsHttp.cpp first commit 2015-10-20 23:03:22 -04:00
nsHttp.h first commit 2015-10-20 23:03:22 -04:00
nsHttpAtomList.h import patches from thunderbird-2.0.0.24-28.el5_7.src.rpm, with following backed out due to broken build: 2018-05-01 18:45:19 +08:00
nsHttpAuthCache.cpp first commit 2015-10-20 23:03:22 -04:00
nsHttpAuthCache.h first commit 2015-10-20 23:03:22 -04:00
nsHttpAuthManager.cpp first commit 2015-10-20 23:03:22 -04:00
nsHttpAuthManager.h first commit 2015-10-20 23:03:22 -04:00
nsHttpBasicAuth.cpp first commit 2015-10-20 23:03:22 -04:00
nsHttpBasicAuth.h first commit 2015-10-20 23:03:22 -04:00
nsHttpChannel.cpp import patches from thunderbird-2.0.0.24-28.el5_7.src.rpm, with following backed out due to broken build: 2018-05-01 18:45:19 +08:00
nsHttpChannel.h first commit 2015-10-20 23:03:22 -04:00
nsHttpChunkedDecoder.cpp first commit 2015-10-20 23:03:22 -04:00
nsHttpChunkedDecoder.h first commit 2015-10-20 23:03:22 -04:00
nsHttpConnection.cpp first commit 2015-10-20 23:03:22 -04:00
nsHttpConnection.h first commit 2015-10-20 23:03:22 -04:00
nsHttpConnectionInfo.cpp first commit 2015-10-20 23:03:22 -04:00
nsHttpConnectionInfo.h first commit 2015-10-20 23:03:22 -04:00
nsHttpConnectionMgr.cpp first commit 2015-10-20 23:03:22 -04:00
nsHttpConnectionMgr.h first commit 2015-10-20 23:03:22 -04:00
nsHttpDigestAuth.cpp first commit 2015-10-20 23:03:22 -04:00
nsHttpDigestAuth.h first commit 2015-10-20 23:03:22 -04:00
nsHttpHandler.cpp fix some brandng issues 2016-01-05 05:55:29 -05:00
nsHttpHandler.h first commit 2015-10-20 23:03:22 -04:00
nsHttpHeaderArray.cpp first commit 2015-10-20 23:03:22 -04:00
nsHttpHeaderArray.h first commit 2015-10-20 23:03:22 -04:00
nsHttpNTLMAuth.cpp first commit 2015-10-20 23:03:22 -04:00
nsHttpNTLMAuth.h first commit 2015-10-20 23:03:22 -04:00
nsHttpPipeline.cpp first commit 2015-10-20 23:03:22 -04:00
nsHttpPipeline.h first commit 2015-10-20 23:03:22 -04:00
nsHttpRequestHead.cpp first commit 2015-10-20 23:03:22 -04:00
nsHttpRequestHead.h first commit 2015-10-20 23:03:22 -04:00
nsHttpResponseHead.cpp first commit 2015-10-20 23:03:22 -04:00
nsHttpResponseHead.h first commit 2015-10-20 23:03:22 -04:00
nsHttpTransaction.cpp first commit 2015-10-20 23:03:22 -04:00
nsHttpTransaction.h first commit 2015-10-20 23:03:22 -04:00
README first commit 2015-10-20 23:03:22 -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>