gecko-dev/netwerk/protocol/http
Nathan Froyd 3ae0060106 Bug 700659 - Slay nsHashSets in netwerk/protocol. r=mcmanus 2012-02-27 11:20:29 -05:00
..
HttpBaseChannel.cpp Bug 598304 - XHR rewrites non-POST methods upon 301/302 redirects. r=bz 2012-02-10 14:12:51 +01:00
HttpBaseChannel.h bug 528288 - reland spdy after libxul weightloss a=khuey CLOSED TREE 2011-12-13 10:55:50 -05:00
HttpChannelChild.cpp Bug 690425 - Fix shutdown crash in HttpChannelChild. r=jdm 2012-02-08 17:46:50 -05:00
HttpChannelChild.h Bug 646512 HttpChannelParent::OnStartRequest deep-copies nsHttpHeaderArray. r=jduell 2012-01-19 14:26:43 -08:00
HttpChannelParent.cpp Bug 621446 - investigation patch 2 for crash at RecvRedirect2Verify, r=jduell 2012-02-17 16:24:30 +01:00
HttpChannelParent.h Bug 646512 HttpChannelParent::OnStartRequest deep-copies nsHttpHeaderArray. r=jduell 2012-01-19 14:26:43 -08:00
HttpChannelParentListener.cpp Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones 2011-09-28 23:19:26 -07: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 Backed out changeset f65247c7647a (bug 729133) 2012-02-26 13:50:34 +13:00
PHttpChannel.ipdl Bug 646512 HttpChannelParent::OnStartRequest deep-copies nsHttpHeaderArray. r=jduell 2012-01-19 14:26:43 -08:00
PHttpChannelParams.h Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones 2011-09-28 23:19:26 -07:00
README Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
SpdySession.cpp bug 729736 - runtime experiment with different spdy ping thresholds r=honzab 2012-02-27 10:32:09 -05:00
SpdySession.h bug 729736 - runtime experiment with different spdy ping thresholds r=honzab 2012-02-27 10:32:09 -05:00
SpdyStream.cpp bug 727943 spdy broke caldav (and probly webdav) methods r=honzab 2012-02-19 14:29:09 -05:00
SpdyStream.h bug 708415 spdy make stream frame writes to session atomic r=honzab 2012-01-26 00:15:26 -05: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 bug 708415 spdysession review comments r=honzab 2012-01-26 00:15:26 -05:00
nsAHttpTransaction.h bug 447866 pre patch 0 - pipeline and spdy mix r=honzab 2012-02-15 16:41:18 -05:00
nsHttp.cpp Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron 2011-10-17 10:59:28 -04:00
nsHttp.h bug 716871 remove nshttp::CLAMP r=jduell 2012-01-10 20:07:29 -05:00
nsHttpActivityDistributor.cpp Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones 2011-09-28 23:19:26 -07: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 716961 - clean up HTTP header field name constants in nsHttpAtomList.h r=bz 2012-01-10 20:06:17 -05:00
nsHttpAuthCache.cpp Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones 2011-09-28 23:19:26 -07:00
nsHttpAuthCache.h Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones 2011-09-28 23:19:26 -07: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 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron 2011-10-17 10:59:28 -04:00
nsHttpBasicAuth.h Bug 542222 - Reduce recursion in netwerk makefiles. 2010-06-05 21:18:12 -04:00
nsHttpChannel.cpp Backed out changeset f65247c7647a (bug 729133) 2012-02-26 13:50:34 +13:00
nsHttpChannel.h Bug 649778 - document.write may cause a document to be written to disk cache even when the page has Cache-Control: no-store 2012-01-30 18:03:52 +01:00
nsHttpChannelAuthProvider.cpp Back out be556c99ef81 and 13c3c54d067b (bug 627616) for orange 2012-02-12 10:53:31 -08:00
nsHttpChannelAuthProvider.h Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones 2011-09-28 23:19:26 -07:00
nsHttpChunkedDecoder.cpp Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron 2011-10-17 10:59:28 -04:00
nsHttpChunkedDecoder.h Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron 2011-10-17 10:59:28 -04:00
nsHttpConnection.cpp Backed out changeset f65247c7647a (bug 729133) 2012-02-26 13:50:34 +13:00
nsHttpConnection.h bug 728113 spdy ping to keepalive nat timeouts 2/2 spdy ping r=honzab 2012-02-23 20:58:43 -05:00
nsHttpConnectionInfo.cpp Backed out changeset f65247c7647a (bug 729133) 2012-02-26 13:50:34 +13:00
nsHttpConnectionInfo.h Backed out changeset f65247c7647a (bug 729133) 2012-02-26 13:50:34 +13:00
nsHttpConnectionMgr.cpp Bug 700659 - Slay nsHashSets in netwerk/protocol. r=mcmanus 2012-02-27 11:20:29 -05:00
nsHttpConnectionMgr.h Bug 700659 - Slay nsHashSets in netwerk/protocol. r=mcmanus 2012-02-27 11:20:29 -05:00
nsHttpDigestAuth.cpp Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron 2011-10-17 10:59:28 -04:00
nsHttpDigestAuth.h Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones 2011-09-28 23:19:26 -07:00
nsHttpHandler.cpp bug 729736 - runtime experiment with different spdy ping thresholds r=honzab 2012-02-27 10:32:09 -05:00
nsHttpHandler.h bug 729736 - runtime experiment with different spdy ping thresholds r=honzab 2012-02-27 10:32:09 -05:00
nsHttpHeaderArray.cpp bug 704227 muddle through on some minor problems with content-length r=jduell 2012-02-09 14:47:30 -05:00
nsHttpHeaderArray.h bug 704227 muddle through on some minor problems with content-length r=jduell 2012-02-09 14:47:30 -05:00
nsHttpNTLMAuth.cpp Bug 452781 - Allow specifying wildcard that matches all simple netbiosnames in network.automatic-ntlm-auth.trusted-uris, r=honzab 2012-02-17 16:24:31 +01:00
nsHttpNTLMAuth.h Bug 573043 - Enable Extended Protection (channel and service bindng) for NTLM authentication, r=jmathies 2011-11-09 18:18:59 +01:00
nsHttpPipeline.cpp bug 447866 pre patch 0 - pipeline and spdy mix r=honzab 2012-02-15 16:41:18 -05:00
nsHttpPipeline.h bug 528288 - reland spdy after libxul weightloss a=khuey CLOSED TREE 2011-12-13 10:55:50 -05:00
nsHttpRequestHead.cpp Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones 2011-09-28 23:19:26 -07:00
nsHttpRequestHead.h Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones 2011-09-28 23:19:26 -07:00
nsHttpResponseHead.cpp bug 704227 muddle through on some minor problems with content-length r=jduell 2012-02-09 14:47:30 -05:00
nsHttpResponseHead.h Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron 2011-10-17 10:59:28 -04:00
nsHttpTransaction.cpp bug 447866 pre patch 0 - pipeline and spdy mix r=honzab 2012-02-15 16:41:18 -05:00
nsHttpTransaction.h bug 528288 - reland spdy after libxul weightloss a=khuey CLOSED TREE 2011-12-13 10:55:50 -05: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 646512 HttpChannelParent::OnStartRequest deep-copies nsHttpHeaderArray. r=jduell 2012-01-19 14:26:43 -08:00
nsIHttpChannelInternal.idl bug 528288 - reland spdy after libxul weightloss a=khuey CLOSED TREE 2011-12-13 10:55:50 -05: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>