tenfourfox/netwerk/protocol/http
Cameron Kaiser f1e53a0c01 #457: M1414425 M1418854 M1411708 M1395508 M1408017 M1425000 + assertion tweaks 2018-01-15 13:46:28 -08:00
..
ASpdySession.cpp hello FPR 2017-04-19 00:56:45 -07:00
ASpdySession.h hello FPR 2017-04-19 00:56:45 -07:00
AlternateServices.cpp hello FPR 2017-04-19 00:56:45 -07:00
AlternateServices.h hello FPR 2017-04-19 00:56:45 -07:00
ConnectionDiagnostics.cpp hello FPR 2017-04-19 00:56:45 -07:00
Http2Compression.cpp hello FPR 2017-04-19 00:56:45 -07:00
Http2Compression.h hello FPR 2017-04-19 00:56:45 -07:00
Http2HuffmanIncoming.h hello FPR 2017-04-19 00:56:45 -07:00
Http2HuffmanOutgoing.h hello FPR 2017-04-19 00:56:45 -07:00
Http2Push.cpp hello FPR 2017-04-19 00:56:45 -07:00
Http2Push.h hello FPR 2017-04-19 00:56:45 -07:00
Http2Session.cpp #416: M1381016 M1371657 2017-08-02 22:46:32 -07:00
Http2Session.h hello FPR 2017-04-19 00:56:45 -07:00
Http2Stream.cpp #399: implement scrollingElement, fix HTTP/2 options, enable SourceMap header 2017-08-15 16:47:33 -07:00
Http2Stream.h hello FPR 2017-04-19 00:56:45 -07:00
HttpBaseChannel.cpp #457, #459: M1413741 M1408990 M1418922 M1422389 M1415598 M1423159 M1399400 M1428589 M1427870 M1425780 2018-01-14 17:23:09 -08:00
HttpBaseChannel.h hello FPR 2017-04-19 00:56:45 -07:00
HttpChannelChild.cpp hello FPR 2017-04-19 00:56:45 -07:00
HttpChannelChild.h hello FPR 2017-04-19 00:56:45 -07:00
HttpChannelParent.cpp hello FPR 2017-04-19 00:56:45 -07:00
HttpChannelParent.h hello FPR 2017-04-19 00:56:45 -07:00
HttpChannelParentListener.cpp hello FPR 2017-04-19 00:56:45 -07:00
HttpChannelParentListener.h hello FPR 2017-04-19 00:56:45 -07:00
HttpInfo.cpp hello FPR 2017-04-19 00:56:45 -07:00
HttpInfo.h hello FPR 2017-04-19 00:56:45 -07:00
HttpLog.h hello FPR 2017-04-19 00:56:45 -07:00
InterceptedChannel.cpp hello FPR 2017-04-19 00:56:45 -07:00
InterceptedChannel.h hello FPR 2017-04-19 00:56:45 -07:00
NullHttpChannel.cpp hello FPR 2017-04-19 00:56:45 -07:00
NullHttpChannel.h hello FPR 2017-04-19 00:56:45 -07:00
NullHttpTransaction.cpp hello FPR 2017-04-19 00:56:45 -07:00
NullHttpTransaction.h hello FPR 2017-04-19 00:56:45 -07:00
OptimizedFor.h hello FPR 2017-04-19 00:56:45 -07:00
PHttpChannel.ipdl hello FPR 2017-04-19 00:56:45 -07:00
PHttpChannelParams.h hello FPR 2017-04-19 00:56:45 -07:00
PSpdyPush.h hello FPR 2017-04-19 00:56:45 -07:00
PackagedAppService.cpp hello FPR 2017-04-19 00:56:45 -07:00
PackagedAppService.h hello FPR 2017-04-19 00:56:45 -07:00
PackagedAppUtils.js hello FPR 2017-04-19 00:56:45 -07:00
PackagedAppUtils.manifest hello FPR 2017-04-19 00:56:45 -07:00
PackagedAppVerifier.cpp hello FPR 2017-04-19 00:56:45 -07:00
PackagedAppVerifier.h hello FPR 2017-04-19 00:56:45 -07:00
README hello FPR 2017-04-19 00:56:45 -07:00
SpdyPush31.cpp hello FPR 2017-04-19 00:56:45 -07:00
SpdyPush31.h hello FPR 2017-04-19 00:56:45 -07:00
SpdySession31.cpp hello FPR 2017-04-19 00:56:45 -07:00
SpdySession31.h hello FPR 2017-04-19 00:56:45 -07:00
SpdyStream31.cpp hello FPR 2017-04-19 00:56:45 -07:00
SpdyStream31.h hello FPR 2017-04-19 00:56:45 -07:00
SpdyZlibReporter.cpp hello FPR 2017-04-19 00:56:45 -07:00
SpdyZlibReporter.h hello FPR 2017-04-19 00:56:45 -07:00
TimingStruct.h hello FPR 2017-04-19 00:56:45 -07:00
TunnelUtils.cpp #443: M1395138 M1400554 M1400003 M1407751 M1261175 2017-10-19 21:55:47 -07:00
TunnelUtils.h hello FPR 2017-04-19 00:56:45 -07:00
UserAgentOverrides.jsm hello FPR 2017-04-19 00:56:45 -07:00
UserAgentUpdates.jsm hello FPR 2017-04-19 00:56:45 -07:00
http2_huffman_table.txt hello FPR 2017-04-19 00:56:45 -07:00
make_incoming_tables.py hello FPR 2017-04-19 00:56:45 -07:00
make_outgoing_tables.py hello FPR 2017-04-19 00:56:45 -07:00
moz.build hello FPR 2017-04-19 00:56:45 -07:00
nsAHttpConnection.h hello FPR 2017-04-19 00:56:45 -07:00
nsAHttpTransaction.h hello FPR 2017-04-19 00:56:45 -07:00
nsCORSListenerProxy.cpp hello FPR 2017-04-19 00:56:45 -07:00
nsCORSListenerProxy.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttp.cpp #440: vmx_strchr() in netwerk/, security/ 2017-11-13 21:36:46 -08:00
nsHttp.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpActivityDistributor.cpp hello FPR 2017-04-19 00:56:45 -07:00
nsHttpActivityDistributor.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpAtomList.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpAuthCache.cpp hello FPR 2017-04-19 00:56:45 -07:00
nsHttpAuthCache.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpAuthManager.cpp hello FPR 2017-04-19 00:56:45 -07:00
nsHttpAuthManager.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpBasicAuth.cpp hello FPR 2017-04-19 00:56:45 -07:00
nsHttpBasicAuth.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpChannel.cpp #457: M1414425 M1418854 M1411708 M1395508 M1408017 M1425000 + assertion tweaks 2018-01-15 13:46:28 -08:00
nsHttpChannel.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpChannelAuthProvider.cpp #440: vmx_strchr() in netwerk/, security/ 2017-11-13 21:36:46 -08:00
nsHttpChannelAuthProvider.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpChunkedDecoder.cpp #440: vmx_strchr() in netwerk/, security/ 2017-11-13 21:36:46 -08:00
nsHttpChunkedDecoder.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpConnection.cpp hello FPR 2017-04-19 00:56:45 -07:00
nsHttpConnection.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpConnectionInfo.cpp hello FPR 2017-04-19 00:56:45 -07:00
nsHttpConnectionInfo.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpConnectionMgr.cpp #416: M1374047 M1365413 M1369913 M1371424 M1346590 M1376087 M1322896 M1354796 M1365333 M1373970 M1355168 2017-07-16 17:51:39 -07:00
nsHttpConnectionMgr.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpDigestAuth.cpp hello FPR 2017-04-19 00:56:45 -07:00
nsHttpDigestAuth.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpHandler.cpp #440: vmx_strchr() in netwerk/, security/ 2017-11-13 21:36:46 -08:00
nsHttpHandler.h #422: bite me imgur 2017-08-10 21:19:38 -07:00
nsHttpHeaderArray.cpp #440: vmx_strchr() in netwerk/, security/ 2017-11-13 21:36:46 -08:00
nsHttpHeaderArray.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpNTLMAuth.cpp hello FPR 2017-04-19 00:56:45 -07:00
nsHttpNTLMAuth.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpPipeline.cpp hello FPR 2017-04-19 00:56:45 -07:00
nsHttpPipeline.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpRequestHead.cpp hello FPR 2017-04-19 00:56:45 -07:00
nsHttpRequestHead.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpResponseHead.cpp #440: vmx_strchr() in netwerk/, security/ 2017-11-13 21:36:46 -08:00
nsHttpResponseHead.h hello FPR 2017-04-19 00:56:45 -07:00
nsHttpTransaction.cpp #440: vmx_strchr() in netwerk/, security/ 2017-11-13 21:36:46 -08:00
nsHttpTransaction.h hello FPR 2017-04-19 00:56:45 -07:00
nsICorsPreflightCallback.h hello FPR 2017-04-19 00:56:45 -07:00
nsIHttpActivityObserver.idl hello FPR 2017-04-19 00:56:45 -07:00
nsIHttpAuthManager.idl hello FPR 2017-04-19 00:56:45 -07:00
nsIHttpAuthenticableChannel.idl hello FPR 2017-04-19 00:56:45 -07:00
nsIHttpAuthenticator.idl hello FPR 2017-04-19 00:56:45 -07:00
nsIHttpChannel.idl hello FPR 2017-04-19 00:56:45 -07:00
nsIHttpChannelAuthProvider.idl hello FPR 2017-04-19 00:56:45 -07:00
nsIHttpChannelChild.idl hello FPR 2017-04-19 00:56:45 -07:00
nsIHttpChannelInternal.idl hello FPR 2017-04-19 00:56:45 -07:00
nsIHttpEventSink.idl hello FPR 2017-04-19 00:56:45 -07:00
nsIHttpHeaderVisitor.idl hello FPR 2017-04-19 00:56:45 -07:00
nsIHttpProtocolHandler.idl hello FPR 2017-04-19 00:56:45 -07: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>