gecko-dev/netwerk/protocol/http
Doug Turner affea2f3a2 Bug 558624 - e10s Cookies: Optimize implementation. Part 1. Clean up warning in http. r=dwitte. a=blocking-fennec
--HG--
extra : rebase_source : 5cbdc4b4314575ba339bc6c663279deb8233e812
2010-10-01 15:18:55 -07:00
..
HttpBaseChannel.cpp Bug 567267 - disable decoding in HttpChannelParent, make smart decisions in child process, r=dwitte, blocking-fennec2.0b1=mfinkle 2010-09-15 15:55:08 -07:00
HttpBaseChannel.h Bug 567267 - disable decoding in HttpChannelParent, make smart decisions in child process, r=dwitte, blocking-fennec2.0b1=mfinkle 2010-09-15 15:55:08 -07:00
HttpChannelChild.cpp Bug 595972 - Fix event queue state invariants on HTTP channel resume. r=jduell a=blocking-fennec 2010-09-17 00:23:25 -07:00
HttpChannelChild.h Bug 567267 - Move nsIEncodedChannel logic to base Http class, r=dwitte, blocking-fennec2.0b1=mfinkle 2010-09-15 15:55:08 -07:00
HttpChannelParent.cpp Bug 567267 - disable decoding in HttpChannelParent, make smart decisions in child process, r=dwitte, blocking-fennec2.0b1=mfinkle 2010-09-15 15:55:08 -07:00
HttpChannelParent.h e10s http: Document channels' cache descriptor causes hang on reloads r=honza 2010-08-17 15:17:00 -07:00
HttpChannelParentListener.cpp Bug 558624 - e10s Cookies: Optimize implementation. Part 1. Clean up warning in http. r=dwitte. a=blocking-fennec 2010-10-01 15:18:55 -07:00
HttpChannelParentListener.h Bug 536294 - e10s HTTP: redirects. r=jduell 2010-08-10 20:11:57 -07:00
Makefile.in Bug 536294 - e10s HTTP: redirects. r=jduell 2010-08-10 20:11:57 -07:00
PHttpChannel.ipdl e10s http: Document channels' cache descriptor causes hang on reloads r=honza 2010-08-17 15:17:00 -07:00
PHttpChannelParams.h Bug 558624 - e10s Cookies: Optimize implementation. Part 1. Clean up warning in http. r=dwitte. a=blocking-fennec 2010-10-01 15:18:55 -07:00
README Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
ipdl.mk Fixup to http after the necko-file-move 2010-06-07 14:40:08 -07:00
nsAHttpConnection.h Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsAHttpTransaction.h Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttp.cpp Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttp.h Fixup to http after the necko-file-move 2010-06-07 14:40:08 -07:00
nsHttpActivityDistributor.cpp Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpActivityDistributor.h Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpAtomList.h Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpAuthCache.cpp Bug 558624 - e10s Cookies: Optimize implementation. Part 1. Clean up warning in http. r=dwitte. a=blocking-fennec 2010-10-01 15:18:55 -07:00
nsHttpAuthCache.h Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpAuthManager.cpp Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpAuthManager.h Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpBasicAuth.cpp Bug 472529, websockets (netwerk patch), r=smaug+biesi 2010-06-17 21:33:42 +03:00
nsHttpBasicAuth.h Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpChannel.cpp Bug 558624 - e10s Cookies: Optimize implementation. Part 1. Clean up warning in http. r=dwitte. a=blocking-fennec 2010-10-01 15:18:55 -07:00
nsHttpChannel.h Bug 567267 - disable decoding in HttpChannelParent, make smart decisions in child process, r=dwitte, blocking-fennec2.0b1=mfinkle 2010-09-15 15:55:08 -07:00
nsHttpChannelAuthProvider.cpp Bug 472529, websockets (netwerk patch), r=smaug+biesi 2010-06-17 21:33:42 +03:00
nsHttpChannelAuthProvider.h Merge from m-c. 2010-06-22 17:33:57 -07:00
nsHttpChunkedDecoder.cpp Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpChunkedDecoder.h Merging with M-C. 2010-06-07 13:38:02 -07:00
nsHttpConnection.cpp Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpConnection.h Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpConnectionInfo.cpp Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpConnectionInfo.h Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpConnectionMgr.cpp Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpConnectionMgr.h Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpDigestAuth.cpp Bug 472529, websockets (netwerk patch), r=smaug+biesi 2010-06-17 21:33:42 +03:00
nsHttpDigestAuth.h Bug 472529, websockets (netwerk patch), r=smaug+biesi 2010-06-17 21:33:42 +03:00
nsHttpHandler.cpp Bug 599122: Don't initialize PSM on child. r=honza a=blocking-fennec-2.0b2 2010-09-30 23:57:01 -07:00
nsHttpHandler.h Bug 581008 - Remove support for appending arbitrary data to the User Agent string. r=jst,khuey sr=dveditz 2010-08-27 09:02:10 +02:00
nsHttpHeaderArray.cpp Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpHeaderArray.h Merging with M-C. 2010-06-07 13:38:02 -07:00
nsHttpNTLMAuth.cpp Bug 472529, websockets (netwerk patch), r=smaug+biesi 2010-06-17 21:33:42 +03:00
nsHttpNTLMAuth.h Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpPipeline.cpp Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpPipeline.h Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpRequestHead.cpp Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpRequestHead.h Merging with M-C. 2010-06-07 13:38:02 -07:00
nsHttpResponseHead.cpp Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpResponseHead.h Merging with M-C. 2010-06-07 13:38:02 -07:00
nsHttpTransaction.cpp Merging with M-C. 2010-06-07 13:38:02 -07:00
nsHttpTransaction.h Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsIHttpActivityObserver.idl Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsIHttpAuthManager.idl Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsIHttpAuthenticableChannel.idl Bug 472529, websockets (netwerk patch), r=smaug+biesi 2010-06-17 21:33:42 +03:00
nsIHttpAuthenticator.idl Bug 472529, websockets (netwerk patch), r=smaug+biesi 2010-06-17 21:33:42 +03:00
nsIHttpChannel.idl Remove @status FROZEN and @status UNDER_REVIEW. r=bsmedberg 2010-07-02 10:27:06 -04:00
nsIHttpChannelAuthProvider.idl Bug 472529, websockets (netwerk patch), r=smaug+biesi 2010-06-17 21:33:42 +03:00
nsIHttpChannelInternal.idl Bug 55307 - Prevent downloads from being stored in the cache. r=jduell a2.0=jst 2010-09-10 07:22:24 +02:00
nsIHttpEventSink.idl Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsIHttpHeaderVisitor.idl Remove @status FROZEN and @status UNDER_REVIEW. r=bsmedberg 2010-07-02 10:27:06 -04:00
nsIHttpProtocolHandler.idl Bug 581008 - Remove support for appending arbitrary data to the User Agent string. r=jst,khuey sr=dveditz 2010-08-27 09:02:10 +02: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>