Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 01-Sep-2019 | - | ||||
ASpdySession.cpp | H A D | 01-Sep-2019 | 3.7 KiB | 122 | 75 | |
ASpdySession.h | H A D | 01-Sep-2019 | 4.4 KiB | 124 | 65 | |
AltDataOutputStreamChild.cpp | H A D | 01-Sep-2019 | 3.5 KiB | 143 | 117 | |
AltDataOutputStreamChild.h | H A D | 01-Sep-2019 | 1.5 KiB | 46 | 25 | |
AltDataOutputStreamParent.cpp | H A D | 01-Sep-2019 | 1.9 KiB | 75 | 58 | |
AltDataOutputStreamParent.h | H A D | 01-Sep-2019 | 1.9 KiB | 53 | 25 | |
AlternateServices.cpp | H A D | 01-Sep-2019 | 36.7 KiB | 1,114 | 943 | |
AlternateServices.h | H A D | 01-Sep-2019 | 6.5 KiB | 195 | 137 | |
BackgroundChannelRegistrar.cpp | H A D | 01-Sep-2019 | 2.4 KiB | 85 | 56 | |
BackgroundChannelRegistrar.h | H A D | 01-Sep-2019 | 1.7 KiB | 52 | 27 | |
CacheControlParser.cpp | H A D | 01-Sep-2019 | 2.6 KiB | 112 | 90 | |
CacheControlParser.h | H A D | 01-Sep-2019 | 1.1 KiB | 44 | 29 | |
ConnectionDiagnostics.cpp | H A D | 01-Sep-2019 | 8.4 KiB | 215 | 171 | |
Http2Compression.cpp | H A D | 01-Sep-2019 | 44.9 KiB | 1,424 | 1,070 | |
Http2Compression.h | H A D | 01-Sep-2019 | 6.2 KiB | 201 | 153 | |
Http2HuffmanIncoming.h | H A D | 01-Sep-2019 | 44.3 KiB | 710 | 653 | |
Http2HuffmanOutgoing.h | H A D | 01-Sep-2019 | 5.1 KiB | 86 | 77 | |
Http2Push.cpp | H A D | 01-Sep-2019 | 15.2 KiB | 494 | 374 | |
Http2Push.h | H A D | 01-Sep-2019 | 4.7 KiB | 154 | 99 | |
Http2Session.cpp | H A D | 01-Sep-2019 | 157.8 KiB | 4,539 | 3,362 | |
Http2Session.h | H A D | 01-Sep-2019 | 22.9 KiB | 595 | 339 | |
Http2Stream.cpp | H A D | 01-Sep-2019 | 55.4 KiB | 1,621 | 1,129 | |
Http2Stream.h | H A D | 01-Sep-2019 | 12.1 KiB | 378 | 202 | |
HttpAuthUtils.cpp | H A D | 01-Sep-2019 | 4.6 KiB | 172 | 114 | |
HttpAuthUtils.h | H A D | 01-Sep-2019 | 925 | 34 | 11 | |
HttpBackgroundChannelChild.cpp | H A D | 01-Sep-2019 | 11.8 KiB | 383 | 258 | |
HttpBackgroundChannelChild.h | H A D | 01-Sep-2019 | 3.9 KiB | 114 | 50 | |
HttpBackgroundChannelParent.cpp | H A D | 01-Sep-2019 | 12.3 KiB | 428 | 324 | |
HttpBackgroundChannelParent.h | H A D | 01-Sep-2019 | 3.1 KiB | 98 | 46 | |
HttpBaseChannel.cpp | H A D | 01-Sep-2019 | 129.8 KiB | 4,305 | 3,167 | |
HttpBaseChannel.h | H A D | 01-Sep-2019 | 31.5 KiB | 841 | 578 | |
HttpChannelChild.cpp | H A D | 01-Sep-2019 | 123.1 KiB | 3,767 | 2,711 | |
HttpChannelChild.h | H A D | 01-Sep-2019 | 20.9 KiB | 513 | 339 | |
HttpChannelParent.cpp | H A D | 01-Sep-2019 | 75.7 KiB | 2,244 | 1,659 | |
HttpChannelParent.h | H A D | 01-Sep-2019 | 13.2 KiB | 327 | 206 | |
HttpChannelParentListener.cpp | H A D | 01-Sep-2019 | 15.9 KiB | 444 | 298 | |
HttpChannelParentListener.h | H A D | 01-Sep-2019 | 3.7 KiB | 101 | 54 | |
HttpInfo.cpp | H A D | 01-Sep-2019 | 485 | 15 | 7 | |
HttpInfo.h | H A D | 01-Sep-2019 | 570 | 25 | 13 | |
HttpLog.h | H A D | 01-Sep-2019 | 2.2 KiB | 68 | 32 | |
InterceptedChannel.cpp | H A D | 01-Sep-2019 | 11.9 KiB | 400 | 314 | |
InterceptedChannel.h | H A D | 01-Sep-2019 | 6.1 KiB | 195 | 139 | |
InterceptedHttpChannel.cpp | H A D | 01-Sep-2019 | 38 KiB | 1,270 | 900 | |
InterceptedHttpChannel.h | H A D | 01-Sep-2019 | 6.6 KiB | 187 | 110 | |
NullHttpChannel.cpp | H A D | 01-Sep-2019 | 20.5 KiB | 818 | 652 | |
NullHttpChannel.h | H A D | 01-Sep-2019 | 1.7 KiB | 64 | 44 | |
NullHttpTransaction.cpp | H A D | 01-Sep-2019 | 9.4 KiB | 287 | 230 | |
NullHttpTransaction.h | H A D | 01-Sep-2019 | 3.6 KiB | 108 | 62 | |
PAltDataOutputStream.ipdl | H A D | 01-Sep-2019 | 1.2 KiB | 42 | 32 | |
PHttpBackgroundChannel.ipdl | H A D | 01-Sep-2019 | 2.4 KiB | 73 | 52 | |
PHttpChannel.ipdl | H A D | 01-Sep-2019 | 6.9 KiB | 173 | 137 | |
PHttpChannelParams.h | H A D | 01-Sep-2019 | 6.8 KiB | 224 | 182 | |
PSpdyPush.h | H A D | 01-Sep-2019 | 2.1 KiB | 58 | 24 | |
README | H A D | 01-Sep-2019 | 4.1 KiB | 120 | 90 | |
TimingStruct.h | H A D | 01-Sep-2019 | 1.1 KiB | 44 | 29 | |
TunnelUtils.cpp | H A D | 01-Sep-2019 | 46.3 KiB | 1,533 | 1,228 | |
TunnelUtils.h | H A D | 01-Sep-2019 | 9.9 KiB | 263 | 141 | |
UAOverridesBootstrapper.manifest | H A D | 01-Sep-2019 | 228 | 4 | 3 | |
UserAgentOverrides.jsm | H A D | 01-Sep-2019 | 4.9 KiB | 174 | 140 | |
UserAgentUpdates.jsm | H A D | 01-Sep-2019 | 8.6 KiB | 281 | 241 | |
WellKnownOpportunisticUtils.manifest | H A D | 01-Sep-2019 | 215 | 4 | 3 | |
make_incoming_tables.py | H A D | 01-Sep-2019 | 5.8 KiB | 195 | 153 | |
make_outgoing_tables.py | H A D | 01-Sep-2019 | 1.4 KiB | 56 | 37 | |
moz.build | H A D | 01-Sep-2019 | 3.6 KiB | 146 | 130 | |
nsAHttpConnection.h | H A D | 01-Sep-2019 | 11.9 KiB | 236 | 127 | |
nsAHttpTransaction.h | H A D | 01-Sep-2019 | 12.2 KiB | 283 | 135 | |
nsCORSListenerProxy.cpp | H A D | 01-Sep-2019 | 50 KiB | 1,524 | 1,131 | |
nsCORSListenerProxy.h | H A D | 01-Sep-2019 | 4.6 KiB | 123 | 79 | |
nsHttp.cpp | H A D | 01-Sep-2019 | 22.9 KiB | 770 | 561 | |
nsHttp.h | H A D | 01-Sep-2019 | 10.9 KiB | 314 | 147 | |
nsHttpActivityDistributor.cpp | H A D | 01-Sep-2019 | 3.7 KiB | 119 | 91 | |
nsHttpActivityDistributor.h | H A D | 01-Sep-2019 | 924 | 37 | 24 | |
nsHttpAtomList.h | H A D | 01-Sep-2019 | 3.7 KiB | 102 | 80 | |
nsHttpAuthCache.cpp | H A D | 01-Sep-2019 | 13.8 KiB | 444 | 309 | |
nsHttpAuthCache.h | H A D | 01-Sep-2019 | 7.7 KiB | 224 | 142 | |
nsHttpAuthManager.cpp | H A D | 01-Sep-2019 | 3.9 KiB | 117 | 87 | |
nsHttpAuthManager.h | H A D | 01-Sep-2019 | 806 | 35 | 20 | |
nsHttpBasicAuth.cpp | H A D | 01-Sep-2019 | 3.3 KiB | 100 | 60 | |
nsHttpBasicAuth.h | H A D | 01-Sep-2019 | 955 | 34 | 16 | |
nsHttpChannel.cpp | H A D | 01-Sep-2019 | 296.3 KiB | 8,983 | 6,257 | |
nsHttpChannel.h | H A D | 01-Sep-2019 | 28.8 KiB | 717 | 450 | |
nsHttpChannelAuthProvider.cpp | H A D | 01-Sep-2019 | 55.3 KiB | 1,639 | 1,115 | |
nsHttpChannelAuthProvider.h | H A D | 01-Sep-2019 | 7.7 KiB | 195 | 117 | |
nsHttpChunkedDecoder.cpp | H A D | 01-Sep-2019 | 5.1 KiB | 169 | 99 | |
nsHttpChunkedDecoder.h | H A D | 01-Sep-2019 | 1.6 KiB | 55 | 36 | |
nsHttpConnection.cpp | H A D | 01-Sep-2019 | 84 KiB | 2,514 | 1,849 | |
nsHttpConnection.h | H A D | 01-Sep-2019 | 16 KiB | 441 | 259 | |
nsHttpConnectionInfo.cpp | H A D | 01-Sep-2019 | 10.4 KiB | 323 | 236 | |
nsHttpConnectionInfo.h | H A D | 01-Sep-2019 | 7.2 KiB | 194 | 115 | |
nsHttpConnectionMgr.cpp | H A D | 01-Sep-2019 | 183.8 KiB | 5,312 | 3,856 | |
nsHttpConnectionMgr.h | H A D | 01-Sep-2019 | 33.2 KiB | 813 | 409 | |
nsHttpDigestAuth.cpp | H A D | 01-Sep-2019 | 20.3 KiB | 654 | 466 | |
nsHttpDigestAuth.h | H A D | 01-Sep-2019 | 3 KiB | 88 | 56 | |
nsHttpHandler.cpp | H A D | 01-Sep-2019 | 86.3 KiB | 2,650 | 2,087 | |
nsHttpHandler.h | H A D | 01-Sep-2019 | 25.5 KiB | 733 | 467 | |
nsHttpHeaderArray.cpp | H A D | 01-Sep-2019 | 14.7 KiB | 452 | 353 | |
nsHttpHeaderArray.h | H A D | 01-Sep-2019 | 10.8 KiB | 290 | 188 | |
nsHttpNTLMAuth.cpp | H A D | 01-Sep-2019 | 13.6 KiB | 392 | 249 | |
nsHttpNTLMAuth.h | H A D | 01-Sep-2019 | 714 | 32 | 17 | |
nsHttpRequestHead.cpp | H A D | 01-Sep-2019 | 8.8 KiB | 319 | 247 | |
nsHttpRequestHead.h | H A D | 01-Sep-2019 | 4.3 KiB | 133 | 85 | |
nsHttpResponseHead.cpp | H A D | 01-Sep-2019 | 33.1 KiB | 1,104 | 807 | |
nsHttpResponseHead.h | H A D | 01-Sep-2019 | 7.1 KiB | 202 | 123 | |
nsHttpTransaction.cpp | H A D | 01-Sep-2019 | 75.8 KiB | 2,292 | 1,639 | |
nsHttpTransaction.h | H A D | 01-Sep-2019 | 17.6 KiB | 486 | 279 | |
nsIBackgroundChannelRegistrar.idl | H A D | 01-Sep-2019 | 2.4 KiB | 64 | 56 | |
nsICorsPreflightCallback.h | H A D | 01-Sep-2019 | 1.1 KiB | 32 | 20 | |
nsIHttpActivityObserver.idl | H A D | 01-Sep-2019 | 5.2 KiB | 129 | 117 | |
nsIHttpAuthManager.idl | H A D | 01-Sep-2019 | 4.8 KiB | 116 | 110 | |
nsIHttpAuthenticableChannel.idl | H A D | 01-Sep-2019 | 3.8 KiB | 123 | 103 | |
nsIHttpAuthenticator.idl | H A D | 01-Sep-2019 | 9.9 KiB | 227 | 211 | |
nsIHttpChannel.idl | H A D | 01-Sep-2019 | 19.8 KiB | 504 | 458 | |
nsIHttpChannelAuthProvider.idl | H A D | 01-Sep-2019 | 3 KiB | 80 | 71 | |
nsIHttpChannelChild.idl | H A D | 01-Sep-2019 | 1.5 KiB | 37 | 28 | |
nsIHttpChannelInternal.idl | H A D | 01-Sep-2019 | 11.8 KiB | 335 | 288 | |
nsIHttpHeaderVisitor.idl | H A D | 01-Sep-2019 | 898 | 27 | 24 | |
nsIHttpProtocolHandler.idl | H A D | 01-Sep-2019 | 5.1 KiB | 143 | 123 | |
nsIRaceCacheWithNetwork.idl | H A D | 01-Sep-2019 | 2.3 KiB | 56 | 49 | |
nsIWellKnownOpportunisticUtils.idl | H A D | 01-Sep-2019 | 912 | 27 | 21 | |
nsServerTiming.cpp | H A D | 01-Sep-2019 | 3.2 KiB | 100 | 66 | |
nsServerTiming.h | H A D | 01-Sep-2019 | 1.3 KiB | 55 | 35 |
README
1 Darin Fisher 2 darin@netscape.com 3 8/8/2001 4 5 HTTP DESIGN NOTES 6 7 8CLASS BREAKDOWN 9 10 nsHttpHandler 11 - implements nsIProtocolHandler 12 - manages preferences 13 - owns the authentication cache 14 - holds references to frequently used services 15 16 nsHttpChannel 17 - implements nsIHttpChannel 18 - talks to the cache 19 - initiates http transactions 20 - processes http response codes 21 - intercepts progress notifications 22 23 nsHttpConnection 24 - implements nsIStreamListener & nsIStreamProvider 25 - talks to the socket transport service 26 - feeds data to its transaction object 27 - routes progress notifications 28 29 nsHttpConnectionInfo 30 - identifies a connection 31 32 nsHttpTransaction 33 - implements nsIRequest 34 - encapsulates a http request and response 35 - parses incoming data 36 37 nsHttpChunkedDecoder 38 - owned by a transaction 39 - removes chunked decoding 40 41 nsHttpRequestHead 42 - owns a nsHttpHeaderArray 43 - knows how to fill a request buffer 44 45 nsHttpResponseHead 46 - owns a nsHttpHeaderArray 47 - knows how to parse response lines 48 - performs common header manipulations/calculations 49 50 nsHttpHeaderArray 51 - stores http "<header>:<value>" pairs 52 53 nsHttpAuthCache 54 - stores authentication credentials for http auth domains 55 56 nsHttpBasicAuth 57 - implements nsIHttpAuthenticator 58 - generates BASIC auth credentials from user:pass 59 60 61ATOMS 62 63 nsHttp:: (header namespace) 64 65 eg. nsHttp::Content_Length 66 67 68TRANSACTION MODEL 69 70 InitiateTransaction -> ActivateConnection -> AsyncWrite, AsyncRead 71 72 The channel creates transactions, and passes them to the handler via 73 InitiateTransaction along with a nsHttpConnectionInfo object 74 identifying the requested connection. The handler either dispatches 75 the transaction immediately or queues it up to be dispatched later, 76 depending on whether or not the limit on the number of connections 77 to the requested server has been reached. Once the transaction can 78 be run, the handler looks for an idle connection or creates a new 79 connection, and then (re)activates the connection, assigning it the 80 new transaction. 81 82 Once activated the connection ensures that it has a socket transport, 83 and then calls AsyncWrite and AsyncRead on the socket transport. This 84 begins the process of talking to the server. To minimize buffering, 85 socket transport thread-proxying is completely disabled (using the flags 86 DONT_PROXY_LISTENER | DONT_PROXY_PROVIDER | DONT_PROXY_OBSERVER with 87 both AsyncWrite and AsyncRead). This means that the nsHttpConnection's 88 OnStartRequest, OnDataAvailable, OnDataWritable, and OnStopRequest 89 methods will execute on the socket transport thread. 90 91 The transaction defines (non-virtual) OnDataReadable, OnDataWritable, and 92 OnStopTransaction methods, which the connection calls in response to 93 its OnDataAvailable, OnDataWritable, and OnStopRequest methods, respectively. 94 The transaction owns a nsStreamListenerProxy created by the channel, which 95 it uses to transfer data from the socket thread over to the client's thread. 96 To mimize buffering, the transaction implements nsIInputStream, and passes 97 itself to the stream listener proxy's OnDataAvailable. In this way, we 98 have effectively wedged the response parsing between the socket and the 99 thread proxy's buffer. When read, the transaction turns around and reads 100 from the socket using the buffer passed to it. The transaction scans the 101 buffer for headers, removes them as they are detected, and copies the headers 102 into its nsHttpResponseHead object. The rest of the data remains in the 103 buffer, and is proxied over to the client's thread to be handled first by the 104 http channel and eventually by the client. 105 106 There are several other major design factors, including: 107 108 - transaction cancelation 109 - progress notification 110 - SSL tunneling 111 - chunked decoding 112 - thread safety 113 - premature EOF detection and transaction restarting 114 - pipelining (not yet implemented) 115 116 117CACHING 118 119<EOF> 120