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

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