summaryrefslogtreecommitdiffstats
path: root/net/http
Commit message (Collapse)AuthorAgeFilesLines
* Preliminary support for GSSAPI (Linux and Mac OS X).ahendrickson@google.com2010-06-043-0/+675
| | | | | | | | | | | Second CL. BUG=33033. TEST=None. Review URL: http://codereview.chromium.org/1736009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48945 0039d316-1c4b-4281-b951-d872f2087c98
* Rework the logging for sockets/connectjobs.eroman@chromium.org2010-06-038-22/+47
| | | | | | | | | | | | | | | | | | In particular, make it work better when using backup jobs / late binding (the display was very confused before because of how these asynchronous events would nest). Also changed the paradigm for how PassiveLogCollector preserves these async associations -- this fixes how it replays the events to net-internals. (Before we would collapse the event streams into the SOURCE_URL_REQUEST which lost some hiearchy.. now I keep the separate streams). Some of the particular changes to the event streams: * ConnectJobs now create their own source stream internally. * Sockets are now bounded by +SOCKET_ALIVE / -SOCKET_ALIVE events (removed the one-off SOCKET_DONE event). * The socket log streams contains +SOCKET_IN_USE / -SOCKET_IN_USE event blocks to show which URLRequest was controlling it at various points in time (this makes it much easier to understand which read/writes belonged to a particular network transaction when a socket gets re-used). * ConnectJobs are bounded by +SOCKET_POOL_CONNECT_JOB / - SOCKET_POOL_CONNECT_JOB events. * ConnectJobs log the net error they failed with. * Removed the SOCKET_BACKUP_TIMER_EXTENDED event. Review URL: http://codereview.chromium.org/2363003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48797 0039d316-1c4b-4281-b951-d872f2087c98
* Use arraysize() instead of ARRAYSIZE_UNSAFE() where possible. Remove ↵pkasting@chromium.org2010-06-011-4/+4
| | | | | | | | | | pointless comment about use of ARRAYSIZE_UNSAFE(). BUG=none TEST=none Review URL: http://codereview.chromium.org/2364003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48663 0039d316-1c4b-4281-b951-d872f2087c98
* view-cache: Refactor ViewCacheHelper and ViewHttpCacheJobFactoryrvargas@google.com2010-05-271-2/+2
| | | | | | | | | | | | to use asynchronous interfaces. BUG=26730 TEST=unittest Review URL: http://codereview.chromium.org/2168004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48438 0039d316-1c4b-4281-b951-d872f2087c98
* Change the proxy waiting-for message to:mbelshe@chromium.org2010-05-271-0/+5
| | | | | | | | | | | | | | "Waiting for proxy tunnel..." Add a message for waiting for the SSL Handshake to complete: "Establishing secure connection..." Also make the waiting messages work for SPDY connections. BUG=none TEST=none Review URL: http://codereview.chromium.org/2262003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48430 0039d316-1c4b-4281-b951-d872f2087c98
* HttpAuthHandlers hold onto a bound net log.cbentzel@chromium.org2010-05-2723-48/+81
| | | | | | | | | | | Although this doesn't have a behavioral impact in this CL, it is needed for additional logging which I'd like to add. BUG=34737 TEST=net_unittests Review URL: http://codereview.chromium.org/2288001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48391 0039d316-1c4b-4281-b951-d872f2087c98
* net-internals: use the async interface for displaying cache statistics.rvargas@google.com2010-05-272-0/+7
| | | | | | | | | BUG=26729 TEST=none Review URL: http://codereview.chromium.org/2279003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48344 0039d316-1c4b-4281-b951-d872f2087c98
* Increase the socket limit for proxy servers to 32.willchan@chromium.org2010-05-251-3/+3
| | | | | | | | BUG=44501 Review URL: http://codereview.chromium.org/2154005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48181 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate the establishing_tunnel_ internal state and move to explicitmbelshe@chromium.org2010-05-252-119/+198
| | | | | | | | | | | | | states in the state machine for proxy tunnel establishment. Original work from svandebo. BUG=none TEST=existing Review URL: http://codereview.chromium.org/2101014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48173 0039d316-1c4b-4281-b951-d872f2087c98
* This change enables FieldTrial for SPDY. When --use-spdy=npn is used, field ↵lzheng@chromium.org2010-05-215-18/+129
| | | | | | | | | | | | | | | | | test won't be enabled. However, when that flag is missing, A/B test is added to browser_main.cc. Trial A: use npn and spdy. B: use npn but no spdy. C: do nothing. A and B are set to zero for now The histograms we collect are: 1. Page begin to finish time when spdy is enabled/disabled across all sites; 2. Page begin to finish time when spdy is used on sites that support spdy and when spdy is intentionally ignored. BUG=43997 TEST=Don't use --use-spdy=npn, manually change _npn_nospdy and _npn_withspdy percentile and go to spdy supported sites. Review URL: http://codereview.chromium.org/2036012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47896 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the TRACE_EVENT for network states. This is no longer needed, since ↵eroman@chromium.org2010-05-212-32/+0
| | | | | | | | most of these states are captured by the NetLog. Review URL: http://codereview.chromium.org/2105013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47878 0039d316-1c4b-4281-b951-d872f2087c98
* Track whether a resource was loaded via a proxy. I'm going to usembelshe@chromium.org2010-05-213-3/+18
| | | | | | | | | | | | this so I can more precisely refine some histograms and filter whether individual resources came through proxies or not. BUG=none TEST=none Review URL: http://codereview.chromium.org/2097012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47877 0039d316-1c4b-4281-b951-d872f2087c98
* Make ClientSocketPool histograms static so that they work properly.vandebo@chromium.org2010-05-203-12/+19
| | | | | | | | | | | | Also change their names so that they appear all together on the histograms page. BUG=43375 TEST=none Review URL: http://codereview.chromium.org/2029004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47843 0039d316-1c4b-4281-b951-d872f2087c98
* Lazy initialization of URLSecurityManager to reduce start-up time.ahendrickson@chromium.org2010-05-2010-26/+25
| | | | | | | | | | | | | | | | This addresses XP perf bot regressions: http://build.chromium.org/buildbot/perf/xp-release-dual-core/startup/report.html?history=50&rev=44850&graph=warm http://build.chromium.org/buildbot/perf/xp-release-single-core/startup/report.html?history=80&rev=44930&graph=warm Had to remove const-ness from URLSecurityManager pointers. BUG=None. TEST=None. Review URL: http://codereview.chromium.org/2110016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47831 0039d316-1c4b-4281-b951-d872f2087c98
* Remove handler from HttpAuthCache.cbentzel@chromium.org2010-05-2023-76/+216
| | | | | | | | | | | This is part of a refactoring meant to simplify the connection phase of HttpNetworkTransaction. BUG=None TEST=net_unittests (which already includes unit tests for preemptive auth, as well as using values from cache). Review URL: http://codereview.chromium.org/2056003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47786 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r47395. Looks like it still crashes =/willchan@chromium.org2010-05-206-162/+42
| | | | | | | | BUG=40455,40457 Review URL: http://codereview.chromium.org/2104013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47753 0039d316-1c4b-4281-b951-d872f2087c98
* Create a dedicated cache thread and use it to create thervargas@google.com2010-05-181-3/+3
| | | | | | | | | | | Http cache. BUG=26730 TEST=none Review URL: http://codereview.chromium.org/1989014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47564 0039d316-1c4b-4281-b951-d872f2087c98
* Digest Authentication: Test that "nc" is incremented for same "nonce".cbentzel@chromium.org2010-05-183-0/+150
| | | | | | | | | | | If the client generates multiple Authorization headers for the same server (or proxy) authenticate header the "nc" (nonce-count) field should be incremented. This tends to happen when preemptive Authentication headers are sent using the previous Authenticate challenge. BUG=NONE TEST=net_unittests --gtest_filter="HttpNetworkTransactionTest.DigestPreAuthNonceCount" Review URL: http://codereview.chromium.org/2112007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47514 0039d316-1c4b-4281-b951-d872f2087c98
* Trigger SSL fallback based on Bad MAC alert.agl@chromium.org2010-05-181-3/+6
| | | | | | | | | | | | We have found a server (www.virginia.edu) which fails at DEFLATE support in a new way: it returns a Bad MAC alert. Thus we add Bad MAC to the list of triggers for falling back to SSLv3. BUG=44251 http://codereview.chromium.org/2086008/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47513 0039d316-1c4b-4281-b951-d872f2087c98
* This is roughly a reland of r43908, although I had to rewrite a fair chunk ↵willchan@chromium.org2010-05-176-42/+162
| | | | | | | | | | since code's changed a lot. I've changed it so as not to flush the host resolver too. I suspect there might have been a bug there. I was unable to reproduce the crash here on network change, so I think either that fixed it or something else changed under the hood. In any case, I want to reland this and see if anyone encounters any problems with it. BUG=40455,40457 Review URL: http://codereview.chromium.org/2114004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47395 0039d316-1c4b-4281-b951-d872f2087c98
* Add the status line to the NetLogHttpResponseParameter.willchan@chromium.org2010-05-141-0/+1
| | | | | | Review URL: http://codereview.chromium.org/2131001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47287 0039d316-1c4b-4281-b951-d872f2087c98
* Fix --host-rules to work properly with proxies.willchan@chromium.org2010-05-131-7/+19
| | | | | | Review URL: http://codereview.chromium.org/2073004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47178 0039d316-1c4b-4281-b951-d872f2087c98
* Add SPDY SYN_STREAM and SYN_REPLY events to about:net-internals.willchan@chromium.org2010-05-131-1/+2
| | | | | | | | BUG=43237 Review URL: http://codereview.chromium.org/2004010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47174 0039d316-1c4b-4281-b951-d872f2087c98
* Remove CRLF from three lines in http_auth_handler.hcbentzel@chromium.org2010-05-131-3/+3
| | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/2101001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47164 0039d316-1c4b-4281-b951-d872f2087c98
* Added authentication scheme as key to HttpAuthCache.cbentzel@chromium.org2010-05-134-77/+126
| | | | | | | | | | | | | | | | | Behavioral changes are small; this is mostly a syntactic sugar change. But there are a few behavioral changes: * If a web site replies with different schemes for the same realm, we'll have two entries in the cache. * There will not be a log entry in HttpNetworkTransaction::SelectNextAuthIdentityToTry when we have the wrong authentication scheme (we don't see that entry any more) * We will no longer return ERR_TUNNEL_CONNECTION_FAILED from SocketStream::HandleAuthChallenge when there's an entry in the cache with a non-basic authentication scheme (we won't know it's there). Contributed by rdsmith@chromium.org BUG=33433 TEST=HttpAuthCacheTest.* (as modified in this commit), HttpNetworkTransactionTest.*, SocketStreamTest.*, only on Linux. Review URL: http://codereview.chromium.org/1949004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47149 0039d316-1c4b-4281-b951-d872f2087c98
* Add --host-rules support.willchan@chromium.org2010-05-122-8/+23
| | | | | | | | | The format for --host-rules is identical to --host-resolver-rules. The difference is that --host-rules affects the endpoint of the HttpNetworkTransaction, not just the host resolver. So, this means the host passed to the host resolver and the TCP connect(), the tunnel CONNECT, and the SOCKS connect will be different. Review URL: http://codereview.chromium.org/2057007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47083 0039d316-1c4b-4281-b951-d872f2087c98
* Enable Alternate-Protocol support by default when NPN support is enabled.willchan@chromium.org2010-05-121-0/+1
| | | | | | Review URL: http://codereview.chromium.org/2015019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47076 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Add a backend factory class so that the callerrvargas@google.com2010-05-123-302/+268
| | | | | | | | | | | | has more control about the backend instantiation. BUG=none TEST=current unit tests. Review URL: http://codereview.chromium.org/2000011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47050 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb NetLog into SpdySession.willchan@chromium.org2010-05-122-7/+5
| | | | | | | | TODO(willchan): Start logging events for SpdySession. Review URL: http://codereview.chromium.org/2059004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47047 0039d316-1c4b-4281-b951-d872f2087c98
* Bypass the DNS cache when the LOAD_VALIDATE_CACHE load flag is set.eroman@chromium.org2010-05-112-4/+19
| | | | | | | | | | | This fixes problem where cached negative DNS entries were being used on a regular page refresh. BUG=34737 TEST=HttpNetworkTransactionTest.BypassHostCacheOnRefresh* Review URL: http://codereview.chromium.org/2051006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46951 0039d316-1c4b-4281-b951-d872f2087c98
* Add the response headers to net-internals.willchan@chromium.org2010-05-112-2/+54
| | | | | | | | BUG=43812 Review URL: http://codereview.chromium.org/2015011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46943 0039d316-1c4b-4281-b951-d872f2087c98
* Add http request headers into about:net-internals.willchan@chromium.org2010-05-102-1/+53
| | | | | | | | BUG=43812 Review URL: http://codereview.chromium.org/2010009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46870 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Add a check to MockHttpCache to make surervargas@google.com2010-05-104-81/+151
| | | | | | | | | | | | | that we always use a completion callback when making disk cache requests, and add new states to truncate the entry's metadata. BUG=26729 TEST=unittests Review URL: http://codereview.chromium.org/2006007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46867 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Handle the asynchronous instantiation of thervargas@google.com2010-05-075-191/+624
| | | | | | | | | | | | | backend. We queue all trasnactions that reach Start before we are done creating the disk cache. BUG=26729 TEST=unittests. Review URL: http://codereview.chromium.org/2002002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46745 0039d316-1c4b-4281-b951-d872f2087c98
* Use net::HttpRequestHeaders instead of std::string in URLRequest and friends.willchan@chromium.org2010-05-062-1/+5
| | | | | | | | BUG=22588 Review URL: http://codereview.chromium.org/1998001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46612 0039d316-1c4b-4281-b951-d872f2087c98
* Get tests working for Alternate-Protocol and proxies.willchan@chromium.org2010-05-052-23/+24
| | | | | | | | Fixed some bugs along the way. Review URL: http://codereview.chromium.org/1947004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46509 0039d316-1c4b-4281-b951-d872f2087c98
* Added unit tests for URLSecurityManager.ahendrickson@chromium.org2010-05-051-0/+88
| | | | | | | | | BUG=29596 TEST=Pass in --gtest_filter=URLSecurityManager.* Review URL: http://codereview.chromium.org/1695008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46486 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a DCHECK that was hit when trying to log information on an invalid ↵eroman@chromium.org2010-05-053-4/+65
| | | | | | | | | | | | | proxy-authentication attempt. AuthOrigin() was being called by LOG(INFO) for a proxy target, when there was no proxy. BUG=43191 TEST=HttpNetworkTransactionTest.UnexpectedProxyAuth Review URL: http://codereview.chromium.org/1961002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46431 0039d316-1c4b-4281-b951-d872f2087c98
* Add ssl into the key for ClientSocketPools.willchan@chromium.org2010-05-042-8/+11
| | | | | | | | | | I chose to use "ssl" instead of "http" and "https" in the connection group string so as not to confuse terminology with spdy which will be over ssl. BUG=43218 TEST=gutschke.com:8888 shouldn't crash Review URL: http://codereview.chromium.org/1951005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46414 0039d316-1c4b-4281-b951-d872f2087c98
* Auto-format style pass over files.cbentzel@chromium.org2010-05-0425-199/+210
| | | | | | | | | | | This is a refactor (actually reformat) only - no behavior change in place. BUG=NONE TEST=net_unittests.exe Review URL: http://codereview.chromium.org/1800003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46349 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Alternate-Protocol to work for PAC proxies.willchan@chromium.org2010-04-302-27/+188
| | | | | | | | | | * Includes some IPv6 fixups for Alternate-Protocol. * Refactors some Alternate-Protocol code, moves the check from DoInitConnection() to DoResolveProxy() so we can send the updated endpoint to the ProxyResolver. BUG=42666 Review URL: http://codereview.chromium.org/1750020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46088 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Alternate-Protocol to work with proxies.willchan@chromium.org2010-04-292-29/+26
| | | | | | | | | Does not yet handle rewriting the URL for the PAC resolver. BUG=42666 Review URL: http://codereview.chromium.org/1699023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45976 0039d316-1c4b-4281-b951-d872f2087c98
* Fix HttpAlternateProtocols unit test.cbentzel@chromium.org2010-04-291-1/+1
| | | | | | | | | BUG=None TEST=net_unittests --gtest_filter="*HttpAlternateProtocols*" Review URL: http://codereview.chromium.org/1699026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45975 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Add support for a dedicated cache thread.rvargas@google.com2010-04-292-2/+25
| | | | | | | | | | | | This is an interface-only change, nothing is really moving to another thread yet. BUG=26730 TEST=none Review URL: http://codereview.chromium.org/983007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45974 0039d316-1c4b-4281-b951-d872f2087c98
* Implement a 15 connection per proxy server limit.willchan@chromium.org2010-04-295-154/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we had a limit of 6 connections per proxy server, which was horrifically low. Connections to all endpoint hosts remains at 6. Basically, we have a map of socket pools, keyed by the proxy server. Each of these proxy socket pools has a socket limit of 15 and a connection limit per host of 6. The main TCP socket pool (non-proxied) has the standard 256 socket limit, and connection limit per host of 6. There are two maps currently, one for HTTP proxies and one for SOCKS proxies. Note that SSL tunnels over HTTP CONNECTs are still located within the standard http proxy socket pools. We depend on the fact that our code never returns a non-SSL connected socket to the pool for a |connection_group| that is to a HTTPS endpoint. A newly connected socket from the pool will only have the TCP connection done. An idle socket will have both the TCP and the HTTP CONNECT and the SSL handshake done for it. TODO(willchan): Remove the extra constructor overload for the old deprecated parameters. Switch to using HostPortPair everywhere. TODO(willchan): Finish SSL socket pools. TODO(willchan): Rip out the DoInitConnection() code so it can be shared by other caller (TCP pre-warming!). TODO(willchan): Flush out the socket pool maps when the proxy configuration changes. TODO(willchan): Fix up global socket limits. They're slightly broken in this case, since each pool instance has its own "global" limit, so obviously different pools don't share the same "global" limit. This is such a minor deal since the global limits are so small for proxy servers compared to the system global limits (256 vs 15), that it doesn't have a big effect. TODO(willchan): Drink moar b33r. BUG=12066 Review URL: http://codereview.chromium.org/1808001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45896 0039d316-1c4b-4281-b951-d872f2087c98
* Compile fix.eroman@chromium.org2010-04-281-1/+1
| | | | | | | | TBR=willchan Review URL: http://codereview.chromium.org/1762014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45853 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Remove the implicit constructor for BoundNetLog that allowed ↵eroman@chromium.org2010-04-284-105/+105
| | | | | | | | | passing NULL in place of a const BoundNetLog&. BUG=37421 Review URL: http://codereview.chromium.org/1783008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45851 0039d316-1c4b-4281-b951-d872f2087c98
* More cleanup to address TODOs in net_log.h.eroman@chromium.org2010-04-283-30/+31
| | | | | | | | | | | * Removes 9 methods: AddEventWithParameters, BeginEventWithParameters, EndEventWithParameters, BeginEventWithString, BeginEventWithInteger, AddEventWithString, AddEventWithInteger, EndEventWithParameters, EndEventWithInteger. This was becoming ridiculous, instead made the EventParameters* a required parameter. * Moves CapturingBoundNetLog / CapturingNetLog to its own file. BUG=37421 Review URL: http://codereview.chromium.org/1746012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45843 0039d316-1c4b-4281-b951-d872f2087c98
* Adds unit tests for how HttpAuthHandlerNegotiate creates SPNs.cbentzel@chromium.org2010-04-282-2/+102
| | | | | | | | | BUG=None TEST=net_unittests --gtest_filter="*HttpAuthHandlerNegotiate*" Review URL: http://codereview.chromium.org/1705001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45821 0039d316-1c4b-4281-b951-d872f2087c98
* Remove proxy_mode_ from the HttpNetworkTransaction since itmbelshe@chromium.org2010-04-282-28/+8
| | | | | | | | | | | is redundant with proxy_info_. BUG=none TEST=covered by existing tests. Review URL: http://codereview.chromium.org/1809001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45787 0039d316-1c4b-4281-b951-d872f2087c98