gecko-dev/netwerk/protocol/http
Marco Castelluccio a1151d128d Bug 682744 - Sprinkle some do_QueryObject fairy dust around the tree; r=khuey 2011-08-30 22:45:31 +01:00
..
HttpBaseChannel.cpp Bug 631967 - Fix unsafe pointer dereference. r=mayhemer 2011-07-21 22:29:00 -04:00
HttpBaseChannel.h Bug 637339 - Improve error handling in HttpChannelChild. r=honzab 2011-06-11 18:37:03 -07:00
HttpChannelChild.cpp Bug 673260. HttpChannelChild::RecvAssociateApplicationCache needs to be buffered. r=jduell 2011-08-22 14:17:14 -07:00
HttpChannelChild.h Bug 673260. HttpChannelChild::RecvAssociateApplicationCache needs to be buffered. r=jduell 2011-08-22 14:17:14 -07:00
HttpChannelParent.cpp Bug 682744 - Sprinkle some do_QueryObject fairy dust around the tree; r=khuey 2011-08-30 22:45:31 +01:00
HttpChannelParent.h bug 655389 - CRLF Injection and the parsing of HTTP headers. r=bz 2011-07-04 23:12:32 -07:00
HttpChannelParentListener.cpp Bug 591707 - e10s: handle redirects from HTTP to a different protocol, r=jduell, a=blocking-fennec2.0b3+ 2010-11-23 23:56:06 +01:00
HttpChannelParentListener.h Bug 591707 - e10s: handle redirects from HTTP to a different protocol, r=jduell, a=blocking-fennec2.0b3+ 2010-11-23 23:56:06 +01:00
Makefile.in Bug 639754 - Remove MOZ_IPC checks since IPC is always built now; r=bsmedberg 2011-04-02 19:14:00 -07:00
PHttpChannel.ipdl Bug 637339 - Improve error handling in HttpChannelChild. r=honzab 2011-06-11 18:37:03 -07:00
PHttpChannelParams.h bug 655389 - CRLF Injection and the parsing of HTTP headers. r=bz 2011-07-04 23:12:32 -07:00
README Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
TimingStruct.h Bug 658822 - Fix implementation of DNS timing in nsITimedChannel; r=jduell 2011-05-22 21:29:42 -07:00
ipdl.mk Fixup to http after the necko-file-move 2010-06-07 14:40:08 -07:00
nsAHttpConnection.h bugzilla 640213 Implement RFC 2616 "Upgrade" (Section 14.42) r=biesi sr=bz 2011-05-19 19:43:37 -04:00
nsAHttpTransaction.h Bug 526207: Make IP address and port information available to HTTP activity observers. r=biesi 2011-04-10 10:33:08 -07:00
nsHttp.cpp Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg 2011-03-31 23:29:02 -05:00
nsHttp.h bug 628561 release http persistent connection on force reload r=bz 2011-07-22 12:31:37 -04:00
nsHttpActivityDistributor.cpp Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg 2011-03-31 23:29:02 -05:00
nsHttpActivityDistributor.h Rollup of bug 645263 and bug 646259: Switch to mozilla:: sync primitives. r=cjones,dbaron,doublec,ehsan src=bsmedberg 2011-03-31 23:29:02 -05:00
nsHttpAtomList.h Bug 655628 - Remove unused Accept_Charset atom. r=biesi 2011-05-10 09:46:14 +02:00
nsHttpAuthCache.cpp Bug 616809 Remove CRs from netwerk r=biesi a=jst DONTBUILD 2011-02-06 00:04:14 +00: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 628561 release http persistent connection on force reload r=bz 2011-07-22 12:31:37 -04:00
nsHttpChannel.h Bug 637339 - Improve error handling in HttpChannelChild. r=honzab 2011-06-11 18:37:03 -07:00
nsHttpChannelAuthProvider.cpp Bug 671185 - Incorrect return of NS_ERROR_* codes in functions returning PRBool, r=mak,ehsan,taras,biesi,pike,khuey,dholbert,josh,bjacob,bsmith 2011-07-25 21:57:58 -07:00
nsHttpChannelAuthProvider.h Merge from m-c. 2010-06-22 17:33:57 -07:00
nsHttpChunkedDecoder.cpp bug 655389 - CRLF Injection and the parsing of HTTP headers. r=bz 2011-07-04 23:12:32 -07:00
nsHttpChunkedDecoder.h Merging with M-C. 2010-06-07 13:38:02 -07:00
nsHttpConnection.cpp Bug 671053: Explicitly drop nsHttpConnection's ref to the callbacks at transaction close rather than waiting for connection reuse/expiration. r=mcmanus 2011-07-14 11:09:48 -07:00
nsHttpConnection.h Back out 58c903b0db40 (bug 658580) temporarily to get m-i in a known good state. 2011-06-15 09:39:42 -07:00
nsHttpConnectionInfo.cpp Bug 669299 - Remove unneeded nsPrintfCString.h includes. r=bsmedberg 2011-07-21 04:37:31 +02:00
nsHttpConnectionInfo.h bug 640003 - websockets, nsIIOService2::NewChannelFromURIWithProxyFlags() r=biesi sr=bz 2011-05-13 13:53:27 -04:00
nsHttpConnectionMgr.cpp Bug 679090 - Disable IPv6 for backup connections to workaround problems about broken IPv6 connectivity; f=mcmanus r=biesi 2011-08-27 11:49:40 +01:00
nsHttpConnectionMgr.h Bug 675873 - Switch nsHttpConnectionMgr from nsHashtable to nsClassHashtable, r=bz 2011-08-03 18:59:10 -07: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 679090 - Disable IPv6 for backup connections to workaround problems about broken IPv6 connectivity; f=mcmanus r=biesi 2011-08-27 11:49:40 +01:00
nsHttpHandler.h Bug 679090 - Disable IPv6 for backup connections to workaround problems about broken IPv6 connectivity; f=mcmanus r=biesi 2011-08-27 11:49:40 +01:00
nsHttpHeaderArray.cpp bug 655389 - CRLF Injection and the parsing of HTTP headers. r=bz 2011-07-04 23:12:32 -07:00
nsHttpHeaderArray.h bug 655389 - CRLF Injection and the parsing of HTTP headers. r=bz 2011-07-04 23:12:32 -07:00
nsHttpNTLMAuth.cpp Bug 637361: Backout bug 573043 2011-03-01 19:11:22 -08:00
nsHttpNTLMAuth.h Bug 637361: Backout bug 573043 2011-03-01 19:11:22 -08:00
nsHttpPipeline.cpp bugzilla 640213 Implement RFC 2616 "Upgrade" (Section 14.42) r=biesi sr=bz 2011-05-19 19:43:37 -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 bug 655389 - CRLF Injection and the parsing of HTTP headers. r=bz 2011-07-04 23:12:32 -07:00
nsHttpResponseHead.cpp bug 655389 - CRLF Injection and the parsing of HTTP headers. r=bz 2011-07-04 23:12:32 -07:00
nsHttpResponseHead.h bug 655389 - CRLF Injection and the parsing of HTTP headers. r=bz 2011-07-04 23:12:32 -07:00
nsHttpTransaction.cpp Bug 662555 - Race condition when measuring responseEnd; r=jduell.mcbugs 2011-08-21 09:27:29 +01:00
nsHttpTransaction.h bug 597706 - response header smuggling r=honzab 2011-05-31 19:51:51 -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 616809 Remove CRs from netwerk r=biesi a=jst DONTBUILD 2011-02-06 00:04:14 +00: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
nsIHttpChannelChild.idl Bug 591707 - e10s: handle redirects from HTTP to a different protocol, r=jduell, a=blocking-fennec2.0b3+ 2010-11-23 23:56:06 +01:00
nsIHttpChannelInternal.idl bugzilla 640213 Implement RFC 2616 "Upgrade" (Section 14.42) r=biesi sr=bz 2011-05-19 19:43:37 -04:00
nsIHttpEventSink.idl Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsIHttpHeaderVisitor.idl Bug 668642 - Make nsIHttpHeaderVisitor a [function] interface. r=bz 2011-06-30 23:55:56 +02:00
nsIHttpProtocolHandler.idl Bug 646428 - Remove nsIHttpProtocolHandler's language attribute. r=bz 2011-04-06 17:17:28 +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>