gecko-dev/netwerk/protocol/http/src
2003-01-18 01:27:53 +00:00
..
.cvsignore
Makefile.in Define WIN32_LEAN_AND_MEAN globally for win32 builds. 2002-10-17 06:47:01 +00:00
nsAHttpConnection.h implement HTTP/1.1 pipelining, b=93054 2002-04-19 22:25:23 +00:00
nsAHttpTransaction.h implement HTTP/1.1 pipelining, b=93054 2002-04-19 22:25:23 +00:00
nsHttp.cpp Http branch landing: changes to netwerk/ (bug 76866) r=gagan,sr=dougt,a=chofmann 2001-05-11 21:04:09 +00:00
nsHttp.h fixes bug 181046 "trim unnecessary bytes from standard request headers." 2002-11-20 20:51:12 +00:00
nsHttpAtomList.h Relicensing Round 1, Take 2. Most C-like NPL files -> NPL/GPL/LGPL. Bug 98089. 2001-09-28 20:14:13 +00:00
nsHttpAuthCache.cpp fixes bug 146074 "Proxy-authorization not on all requests after authentication" 2002-05-22 03:26:21 +00:00
nsHttpAuthCache.h Fixes mozilla/strings requiring unfrozen nsCRT class. patch by scc, r=dougt, sr=jag, b=136756 2002-05-15 18:55:21 +00:00
nsHttpBasicAuth.cpp Bug 178643: Remove uses of NS_INIT_ISUPPORTS, since it is no longer needed. r=timeless sr=jag 2003-01-08 22:35:09 +00:00
nsHttpBasicAuth.h fixes bug 105292 - Mozilla is sending an Accept-encoding for deflate and 2002-08-07 01:16:49 +00:00
nsHttpChannel.cpp Bug 178643: Remove uses of NS_INIT_ISUPPORTS, since it is no longer needed. r=timeless sr=jag 2003-01-08 22:35:09 +00:00
nsHttpChannel.h Prioritize data-sniffing over extension-sniffing for ftp and http. Bug 2002-11-06 22:29:17 +00:00
nsHttpChunkedDecoder.cpp fixes bug 140107 "HTTP headers show in frame [when server pipelines chunked 2002-06-17 21:08:46 +00:00
nsHttpChunkedDecoder.h fixes bug 140107 "HTTP headers show in frame [when server pipelines chunked 2002-06-17 21:08:46 +00:00
nsHttpConnection.cpp Bug 178643: Remove uses of NS_INIT_ISUPPORTS, since it is no longer needed. r=timeless sr=jag 2003-01-08 22:35:09 +00:00
nsHttpConnection.h first patch for bug 181230 "profile-change-net-teardown must work" 2002-12-06 06:38:52 +00:00
nsHttpConnectionInfo.cpp new files for bug 176919 "async streams" r=dougt,gordon sr=sspitzer a=valeski,asa 2003-01-18 01:27:53 +00:00
nsHttpConnectionInfo.h fixes bug 124042 "support internationalized URIs" r=dougt, sr=alecf, a=asa 2002-03-06 07:48:55 +00:00
nsHttpConnectionMgr.cpp new files for bug 176919 "async streams" r=dougt,gordon sr=sspitzer a=valeski,asa 2003-01-18 01:27:53 +00:00
nsHttpConnectionMgr.h new files for bug 176919 "async streams" r=dougt,gordon sr=sspitzer a=valeski,asa 2003-01-18 01:27:53 +00:00
nsHttpDigestAuth.cpp Bug 178643: Remove uses of NS_INIT_ISUPPORTS, since it is no longer needed. r=timeless sr=jag 2003-01-08 22:35:09 +00:00
nsHttpDigestAuth.h fixes bug 15860 "support http/1.1 digest authentication" 2001-12-04 23:49:06 +00:00
nsHttpHandler.cpp Bug 178643: Remove uses of NS_INIT_ISUPPORTS, since it is no longer needed. r=timeless sr=jag 2003-01-08 22:35:09 +00:00
nsHttpHandler.h Bug 178643: Remove uses of NS_INIT_ISUPPORTS, since it is no longer needed. r=timeless sr=jag 2003-01-08 22:35:09 +00:00
nsHttpHeaderArray.cpp fixes bug 181440 "UBS E-Banking broken because of regression in http headers" 2002-11-23 01:30:26 +00:00
nsHttpHeaderArray.h fixes bug 157133 "HTTP Interfaces need to be frozen" r=dougt sr=bzbarsky 2002-11-22 07:40:16 +00:00
nsHttpPipeline.cpp Bug 178643: Remove uses of NS_INIT_ISUPPORTS, since it is no longer needed. r=timeless sr=jag 2003-01-08 22:35:09 +00:00
nsHttpPipeline.h implement HTTP/1.1 pipelining, b=93054 2002-04-19 22:25:23 +00:00
nsHttpRequestHead.cpp Proxy-authorization header incorrectly sent to server during SSL session 2002-03-13 07:34:51 +00:00
nsHttpRequestHead.h fixes bug 157133 "HTTP Interfaces need to be frozen" r=dougt sr=bzbarsky 2002-11-22 07:40:16 +00:00
nsHttpResponseHead.cpp fixes bug 157133 "HTTP Interfaces need to be frozen" r=dougt sr=bzbarsky 2002-11-22 07:40:16 +00:00
nsHttpResponseHead.h fixes bug 157133 "HTTP Interfaces need to be frozen" r=dougt sr=bzbarsky 2002-11-22 07:40:16 +00:00
nsHttpTransaction.cpp Bug 178643: Remove uses of NS_INIT_ISUPPORTS, since it is no longer needed. r=timeless sr=jag 2003-01-08 22:35:09 +00:00
nsHttpTransaction.h fixes bug 24197 "RFE Show progress while uploading files (in a form post)" 2002-09-11 03:23:36 +00:00
README description of http implementation (initial cut) 2001-08-27 08:28:37 +00: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>