khronosschoty 17d73c84dc added Pale Moon 29.4.4 3 lat temu
..
ASpdySession.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
ASpdySession.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
AltDataOutputStreamChild.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
AltDataOutputStreamChild.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
AltDataOutputStreamParent.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
AltDataOutputStreamParent.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
AlternateServices.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
AlternateServices.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
CacheControlParser.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
CacheControlParser.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
ConnectionDiagnostics.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
Http2Compression.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
Http2Compression.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
Http2HuffmanIncoming.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
Http2HuffmanOutgoing.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
Http2Push.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
Http2Push.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
Http2Session.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
Http2Session.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
Http2Stream.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
Http2Stream.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
HttpBaseChannel.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
HttpBaseChannel.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
HttpChannelChild.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
HttpChannelChild.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
HttpChannelParent.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
HttpChannelParent.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
HttpChannelParentListener.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
HttpChannelParentListener.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
HttpInfo.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
HttpInfo.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
HttpLog.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
InterceptedChannel.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
InterceptedChannel.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
NullHttpChannel.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
NullHttpChannel.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
NullHttpTransaction.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
NullHttpTransaction.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
PAltDataOutputStream.ipdl 17d73c84dc added Pale Moon 29.4.4 3 lat temu
PHttpChannel.ipdl 17d73c84dc added Pale Moon 29.4.4 3 lat temu
PHttpChannelParams.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
PSpdyPush.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
README 17d73c84dc added Pale Moon 29.4.4 3 lat temu
TimingStruct.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
TunnelUtils.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
TunnelUtils.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
UserAgentOverrides.jsm 17d73c84dc added Pale Moon 29.4.4 3 lat temu
UserAgentUpdates.jsm 17d73c84dc added Pale Moon 29.4.4 3 lat temu
WellKnownOpportunisticUtils.js 17d73c84dc added Pale Moon 29.4.4 3 lat temu
WellKnownOpportunisticUtils.manifest 17d73c84dc added Pale Moon 29.4.4 3 lat temu
http2_huffman_table.txt 17d73c84dc added Pale Moon 29.4.4 3 lat temu
make_incoming_tables.py 17d73c84dc added Pale Moon 29.4.4 3 lat temu
make_outgoing_tables.py 17d73c84dc added Pale Moon 29.4.4 3 lat temu
moz.build 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsAHttpConnection.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsAHttpTransaction.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsCORSListenerProxy.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsCORSListenerProxy.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttp.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttp.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpActivityDistributor.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpActivityDistributor.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpAtomList.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpAuthCache.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpAuthCache.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpAuthManager.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpAuthManager.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpBasicAuth.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpBasicAuth.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpChannel.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpChannel.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpChannelAuthProvider.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpChannelAuthProvider.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpChunkedDecoder.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpChunkedDecoder.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpConnection.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpConnection.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpConnectionInfo.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpConnectionInfo.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpConnectionMgr.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpConnectionMgr.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpDigestAuth.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpDigestAuth.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpHandler.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpHandler.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpHeaderArray.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpHeaderArray.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpNTLMAuth.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpNTLMAuth.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpPipeline.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpPipeline.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpRequestHead.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpRequestHead.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpResponseHead.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpResponseHead.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpTransaction.cpp 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsHttpTransaction.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsICorsPreflightCallback.h 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsIHttpActivityObserver.idl 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsIHttpAuthManager.idl 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsIHttpAuthenticableChannel.idl 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsIHttpAuthenticator.idl 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsIHttpChannel.idl 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsIHttpChannelAuthProvider.idl 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsIHttpChannelChild.idl 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsIHttpChannelInternal.idl 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsIHttpEventSink.idl 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsIHttpHeaderVisitor.idl 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsIHttpProtocolHandler.idl 17d73c84dc added Pale Moon 29.4.4 3 lat temu
nsIWellKnownOpportunisticUtils.idl 17d73c84dc added Pale Moon 29.4.4 3 lat temu

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 ":" 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