summaryrefslogtreecommitdiffstats
path: root/net/http
Commit message (Collapse)AuthorAgeFilesLines
* We don't handle certificate errors during SSL renegotiation.wtc@chromium.org2009-06-091-0/+9
| | | | | | | | | | | | | | | | | | In the common case, the server sends the same certificate during renegotiation. Since the certificate has been verified, we can assume the certificate is good or has been accepted by the user. If the server sends a different certificate that has an error, we need to return an error code that won't trigger our certificate error handling code, which doesn't handle this case correctly. Add the ERR_CERT_ERROR_IN_SSL_RENEGOTIATION error for this purpose. R=rvargas BUG=http://crbug.com/13226 TEST=See http://crbug.com/13226 comment 9 Review URL: http://codereview.chromium.org/118410 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17919 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash on fallback in HttpNetworkTransaction::ReconsiderProxyAfterError().willchan@chromium.org2009-06-062-1/+48
| | | | | | | | | | If the socket doesn't exist, don't try to Disconnect() it. BUG=http://www.crbug.com/13375 TEST=See bug for repro. Review URL: http://codereview.chromium.org/119228 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17808 0039d316-1c4b-4281-b951-d872f2087c98
* Send the "Proxy-Connection: keep-alive" header with HTTP CONNECTwtc@chromium.org2009-06-052-12/+21
| | | | | | | | | | | | | | requests for compatibility with HTTP/1.0 proxies such as Squid. This is required for NTLM authentication. Fix some cpplint.py nits in http_network_transaction_unittest.cc. R=eroman BUG=http://crbug.com/8771 TEST=net_unittests passes all tests Review URL: http://codereview.chromium.org/118316 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17761 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r17673, except for the code cleanup.wtc@chromium.org2009-06-051-6/+38
| | | | | | | | | | | | I will try the real fix (sending the "Proxy-Connection: keep-alive" header with HTTP CONNECT requests) next. R=eroman BUG=http://crbug.com/8771 TEST=none Review URL: http://codereview.chromium.org/114083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17759 0039d316-1c4b-4281-b951-d872f2087c98
* Add two small features to the HttpCache for benchmarking/debugging.mbelshe@google.com2009-06-053-11/+55
| | | | | | | | | | | | | | | | | | The first exposes a method to close all idle sockets. This allows me to create benchmark tests in the app which can close connections before starting the test for better simulations. The second change is to expose cache modes for cache disabled and cache bypassed. DISABLE sets the LOAD_DISABLE_CACHE on every request; BYPASS sets the LOAD_BYPASS_CACHE on every request. TEST=http_cache_unittest.cc BUG=6754 Review URL: http://codereview.chromium.org/119189 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17720 0039d316-1c4b-4281-b951-d872f2087c98
* Make ClientSocketPool an interface. Move ClientSocketPool code into ↵willchan@chromium.org2009-06-051-2/+2
| | | | | | | | | | TCPClientSocketPool. Strictly a refactoring. BUG=http://www.crbug.com/13289 TEST=still builds and tests pass Review URL: http://codereview.chromium.org/119184 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17710 0039d316-1c4b-4281-b951-d872f2087c98
* Use a "SessionDependencies" helper in the http unit tests.ericroman@google.com2009-06-051-194/+188
| | | | | | | | This avoids some duplication in setup. Review URL: http://codereview.chromium.org/118293 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17694 0039d316-1c4b-4281-b951-d872f2087c98
* For connection-based authentication schemes such as NTLM,wtc@chromium.org2009-06-041-41/+13
| | | | | | | | | | | | we keep the connection alive even if the server or proxy tells us to close it. R=eroman BUG=http://crbug.com/8771 TEST=none Review URL: http://codereview.chromium.org/119068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17673 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Interface for the sparse cache support.rvargas@google.com2009-06-041-2/+77
| | | | | | | | | | | | This is just the interface declaration plus a mocked implementation of the interface. BUG=12258 TEST=none Review URL: http://codereview.chromium.org/119072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17669 0039d316-1c4b-4281-b951-d872f2087c98
* Reland my ClientSocketPool refactor again...willchan@chromium.org2009-06-045-196/+176
| | | | | | | | | | The bug was that the handle was getting reused, so the ConnectingSocket doesn't know that it got canceled. It just keeps chugging away. I added a map to keep track of the ConnectingSockets so they can be canceled if we detect a reuse. TBR=wtc Review URL: http://codereview.chromium.org/118219 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17606 0039d316-1c4b-4281-b951-d872f2087c98
* Sigh, revert "Reland my ClientSocketPool refactor."willchan@chromium.org2009-06-045-176/+196
| | | | | | | | | This reverts commit d3d93c94d040db33599b798723ac1fef560b653a. It broke document-location-click-timeout.html again =/ Review URL: http://codereview.chromium.org/119143 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17591 0039d316-1c4b-4281-b951-d872f2087c98
* Reland my ClientSocketPool refactor.willchan@chromium.org2009-06-045-196/+176
| | | | | | | | | | | Fixed a bug where we were double compensating for active_socket_count in CancelRequest and OnIOComplete. Added ClientSocketPoolTest_TwoRequestsCancelOne to catch this. Triggered a DCHECK in debug mode before I removed the extra code in OnIOComplete. BUG=http://www.crbug.com/13289 Review URL: http://codereview.chromium.org/118172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17588 0039d316-1c4b-4281-b951-d872f2087c98
* Remove code path that passes a file handle to the rendererhclam@chromium.org2009-05-295-135/+3
| | | | | | | | | | | | | | | | | | | | | | Since the code now does range request without any caching the code path for passing file handle is not used any more. Changes: 1. Remove response_data_file in webkit_glue::ResourceResponseHead 2. Remove response_data_file in net::ResourceInfo 3. Remove code that passes file handle using IPC 4. Remove code that passes file hadnle from network layer to ResourceDispatcherHost 5. Remove MediaResourceHandler 6. Remove code in disk_cache that expose the file handle 7. Remove ChromeURLRequestContext::CreateOffTheRecordForMedia() so no more OTR request context for media, in OTR mode simply memory cache is used 8. Reset cache size for media cache to default BUG=12249 BUG=12256 Review URL: http://codereview.chromium.org/113931 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17227 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce header dependencies in net/phajdan.jr@chromium.org2009-05-292-0/+2
| | | | | | | | TEST=none Review URL: http://codereview.chromium.org/115870 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17178 0039d316-1c4b-4281-b951-d872f2087c98
* HttpResponseHeaders::GetContentRange() to handle implied LWShclam@chromium.org2009-05-262-20/+78
| | | | | | | | | | | There was a bug in HttpResponseHeaders::GetContentRange() that it didn't respect implied LWS rule, i.e. there can be arbitrary number of spaces in the header value between tokens. TEST=HttpResponseHeaders.GetContentRange Review URL: http://codereview.chromium.org/113675 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16921 0039d316-1c4b-4281-b951-d872f2087c98
* Extract socket mocks out of HttpNetworkTransactionTest.phajdan.jr@chromium.org2009-05-231-501/+140
| | | | | | | | | | This is the first step towards writing tests for FtpNetworkTransaction. http://crbug.com/12409 Review URL: http://codereview.chromium.org/115646 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16837 0039d316-1c4b-4281-b951-d872f2087c98
* Fix gconf for the linux proxy config service.sdoyon@chromium.org2009-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | -Reenables fetching of settings from gconf. -Moves all gconf access to happen from the UI thread only, (where the default glib main loop runs). -Adds support for gconf notifications, avoiding having to poll the settings. -Fixes a small initialization glitch in the unittest. Plus minor code style tweaks. -Permanently removes gdk and glib threading initialization calls that were previously disabled. -Slight reorganization of ProxyService creation to pass down the IO thread MessageLoop. BUG=11111 TEST=none Review URL: http://codereview.chromium.org/113043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16739 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Temporarily landing my ClientSocketPool refactor. Will revert right ↵willchan@chromium.org2009-05-225-175/+196
| | | | | | | | after." Review URL: http://codereview.chromium.org/113760 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16732 0039d316-1c4b-4281-b951-d872f2087c98
* Temporarily landing my ClientSocketPool refactor. Will revert right after.willchan@chromium.org2009-05-225-196/+175
| | | | | | Review URL: http://codereview.chromium.org/113759 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16731 0039d316-1c4b-4281-b951-d872f2087c98
* Changes the UI for HTTP/FTP auth challenges to include the server's port. So ↵ericroman@google.com2009-05-213-43/+27
| | | | | | | | | | | instead of "www.foo.com" it will say "www.foo.com:80". We need to include the port number since otherwise it can be ambiguous what the actual target server is. This change also introduces utility function "GetHostAnd[Optional]Port()" to help with forming <host> [":" <port>] strings. BUG=12073 Review URL: http://codereview.chromium.org/112041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16672 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Revert "Revert "Add connected socket function to ClientSocketPool ↵willchan@chromium.org2009-05-185-175/+196
| | | | | | | | | | | and ClientSocketHandle.""" Revert "Fix a memory leak in client_socket_pool_unittest.cc." Guess I still fail. kasperl pointed out that this managed to break layout tests and some reliability tests too. Review URL: http://codereview.chromium.org/113517 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16269 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Revert "Add connected socket function to ClientSocketPool and ↵willchan@chromium.org2009-05-175-196/+175
| | | | | | | | | | | | ClientSocketHandle."" This reverts commit c235c719f964cc8f7f9343177ae6d5af724be6c0. Fixes a use of deleted memory by making a copy instead of keeping a reference to the deleted memory. Review URL: http://codereview.chromium.org/113512 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16263 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Add connected socket function to ClientSocketPool and ↵willchan@chromium.org2009-05-175-175/+196
| | | | | | | | | | ClientSocketHandle." Broke net_unittests on windows. Review URL: http://codereview.chromium.org/113510 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16261 0039d316-1c4b-4281-b951-d872f2087c98
* Add connected socket function to ClientSocketPool and ClientSocketHandle.willchan@chromium.org2009-05-175-196/+175
| | | | | | | | Provide a new api in ClientSocketPool and ClientSocketHandle for clients (notably HttpNetworkTransaction) to request connected sockets, rather than having to allocate and Connect() sockets themselves. Add a bunch of tests for it. Have not begun switching clients over to using this. Review URL: http://codereview.chromium.org/99143 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16260 0039d316-1c4b-4281-b951-d872f2087c98
* Use the new HostNoBrackets() method in more places.wtc@chromium.org2009-05-161-2/+2
| | | | | | | | | | | | | Note that IP addresses in certificate names are encoded in binary form (octet strings -- 4 octets for IPv4 and 16 octets for IPv6). R=eroman http://crbug.com/12005 TEST=covered by current tests Review URL: http://codereview.chromium.org/113438 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16213 0039d316-1c4b-4281-b951-d872f2087c98
* Assert that HttpNetworkTransaction::GetResponseInfo() shouldukai@chromium.org2009-05-151-1/+5
| | | | | | | | | | | | never return NULL when we get a certificate error. R=wtc BUG=11646 TEST=access https://www.cdep.ro/ Review URL: http://codereview.chromium.org/113330 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16144 0039d316-1c4b-4281-b951-d872f2087c98
* Change the host() method of ProxyServer to strip thewtc@chromium.org2009-05-141-2/+2
| | | | | | | | | | | | | | | | | | | | | square brackets around an IPv6 literal address. Rename the method HostNoBrackets() to be consistent with GURL's new HostNoBrackets() method. When resolving an address, use the new HostNoBrackets() method instead of host(). Part of this changelist was contributed by Paul Marks of Google. Original review: http://codereview.chromium.org/115342 R=eroman http://crbug.com/12005 TEST=covered by new test cases in unit test Review URL: http://codereview.chromium.org/114029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16123 0039d316-1c4b-4281-b951-d872f2087c98
* Making command-line specified proxy settings more flexible - allowing for ↵robertshield@google.com2009-05-121-3/+3
| | | | | | | | | | setting of auto-detect, pac url, per-schema proxy settings, proxy bypass urls. BUG=http://crbug.com/266 Review URL: http://codereview.chromium.org/115029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15855 0039d316-1c4b-4281-b951-d872f2087c98
* Use IOBuffers on UploadDataStream.rvargas@google.com2009-05-112-9/+2
| | | | | | | | | | | | This is some cleanup of cl 14998. R=wtc BUG=9258 TEST=none Review URL: http://codereview.chromium.org/115157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15812 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure that a null separates individual http headers whenrvargas@google.com2009-05-072-2/+23
| | | | | | | | | | | we pickle them. BUG=7945 TEST=unittest. Review URL: http://codereview.chromium.org/113110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15601 0039d316-1c4b-4281-b951-d872f2087c98
* Add two more error codes to net.rvargas@google.com2009-05-071-2/+2
| | | | | | | | | BUG=9952 TEST=none Review URL: http://codereview.chromium.org/115006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15488 0039d316-1c4b-4281-b951-d872f2087c98
* Set endianness for ARM.thestig@chromium.org2009-05-011-2/+1
| | | | | | Review URL: http://codereview.chromium.org/100271 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15092 0039d316-1c4b-4281-b951-d872f2087c98
* Deprecate wstring version of PathService::Get() in net.thestig@chromium.org2009-05-011-1/+2
| | | | | | Review URL: http://codereview.chromium.org/100240 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15088 0039d316-1c4b-4281-b951-d872f2087c98
* Extend the use of IOBuffers to the code underneathrvargas@google.com2009-04-303-43/+87
| | | | | | | | | | | | | | HttpNetworkTransaction (to the Socket class). This is the first step to remove the blocking call on the destructor of the network transaction, from IO thread. BUG=9258 R=wtc Review URL: http://codereview.chromium.org/87073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14998 0039d316-1c4b-4281-b951-d872f2087c98
* Add a histogram to measure the number of idle sockets when a TCP connection ↵willchan@chromium.org2009-04-301-0/+6
| | | | | | | | is established. Review URL: http://codereview.chromium.org/99205 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14955 0039d316-1c4b-4281-b951-d872f2087c98
* Implement a parser that parses the "Range" HTTP headerhclam@chromium.org2009-04-286-2/+452
| | | | | | | | | Parses "Range" HTTP request header so this request information can be used in URLRequestFileJob and HttpCache. Review URL: http://codereview.chromium.org/92006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14784 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor HttpNetworkTransaction to remove side effects in some member functions.willchan@chromium.org2009-04-283-427/+785
| | | | | | | | | | I'm preparing to move some of this functionality out to a HttpStream object or something. I'm hindered here by the mutation of state in functions that seemingly should be const. I've refactored some code into non-member functions to make the dependencies more explicit. This will make it easier for me to pull some of this code out. Also dropped the net:: qualifiers in the unittest. TESTED=Ran net_unittests Review URL: http://codereview.chromium.org/100001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14772 0039d316-1c4b-4281-b951-d872f2087c98
* Add a histogram to record the dns resolution + tcp connection times.willchan@chromium.org2009-04-282-4/+19
| | | | | | Review URL: http://codereview.chromium.org/100112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14765 0039d316-1c4b-4281-b951-d872f2087c98
* Implement HttpResponseHeaders::GetContentRange and unittestshclam@chromium.org2009-04-223-3/+295
| | | | | | | | | Parse "Content-Range" header in HttpResponseHeaders according to RFC 2616 14.16. Review URL: http://codereview.chromium.org/88068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14238 0039d316-1c4b-4281-b951-d872f2087c98
* Log the "Proxy-Support: Session-Based-Authentication"wtc@chromium.org2009-04-212-29/+68
| | | | | | | | | | | | response header. Log an INFO message whenever we receive an auth challenge. R=eroman BUG=8771 Review URL: http://codereview.chromium.org/67117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14108 0039d316-1c4b-4281-b951-d872f2087c98
* Add a unit test for recycling a keep-alive connection socketwtc@chromium.org2009-04-211-0/+59
| | | | | | | | | | in the normal case, with a non-zero-length response body. R=eroman BUG=9880 Review URL: http://codereview.chromium.org/67129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14082 0039d316-1c4b-4281-b951-d872f2087c98
* Add histogram for connection times for new connectionsjar@chromium.org2009-04-211-0/+8
| | | | | | | | | | | | The existing histogram appears ot have too much "noise" introduced by including existing connections. The goal is to quantify impact of DNS prefetching via an experiment, and this should produce more focused info for that FieldTrial. r=willchan Review URL: http://codereview.chromium.org/90005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14073 0039d316-1c4b-4281-b951-d872f2087c98
* Add a FieldTrial and histograms for measuring impact of http prioritization.willchan@chromium.org2009-04-201-2/+26
| | | | | | | | | Currently this FieldTrial is measuring the transaction latencies of requests, separated into frame/subframe requests vs subresource requests. We run a 2% holdback experiment where the people in the holdback don't have http prioritization enabled. Add class static method to ResourceDispatcherHost to disable http prioritization. BUG=10486 Review URL: http://codereview.chromium.org/67119 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14040 0039d316-1c4b-4281-b951-d872f2087c98
* Add tcp connection time histograms.willchan@chromium.org2009-04-172-0/+20
| | | | | | Review URL: http://codereview.chromium.org/77036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13985 0039d316-1c4b-4281-b951-d872f2087c98
* Histogram time from request till first byte of header is receivedjar@chromium.org2009-04-132-7/+22
| | | | | | | | | Use this as part of the DNS testing trials. r=wtc Review URL: http://codereview.chromium.org/67083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13634 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the "Proxy-Support: Session-Based-Authentication"wtc@chromium.org2009-04-101-12/+6
| | | | | | | | | | | response headers from the NTLMAuth1 and NTLMAuth2 tests because they were inserted by Fiddler 2 (acting as a proxy) rather than from the server. R=eroman Review URL: http://codereview.chromium.org/67057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13547 0039d316-1c4b-4281-b951-d872f2087c98
* Add a boolean data member reading_body_from_socket_ to helpwtc@chromium.org2009-04-103-3/+90
| | | | | | | | | | | | | | | | DoReadBodyComplete() determine whether a result of 0 actually comes from a socket read, indicating EOF. In unit tests, need to call RunAllPending() before calling idle_socket_count() to get an accurate idle socket count because idle sockets are added to the connection pool with a PostTask. R=eroman BUG=9880 Review URL: http://codereview.chromium.org/63139 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13511 0039d316-1c4b-4281-b951-d872f2087c98
* DNS prefetch experiment extension: Consider different connection count limitsjar@chromium.org2009-04-082-6/+30
| | | | | | | | | | | | This CL both enables selection of a run-time selected limit on the number of connections to a single host, and varies that limit to see how it relates to DNS prefetch latency in connections. r=wtc Review URL: http://codereview.chromium.org/62083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13339 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for bug 9608. adding check that tokenized header is valid.ace@google.com2009-04-022-1/+12
| | | | | | Review URL: http://codereview.chromium.org/60008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13050 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmitted code from revision 12809. The bug in the Windows SSL stack thatmarkus@chromium.org2009-03-313-96/+371
| | | | | | | this code originally uncovered has been fixed in a separate changelist. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12876 0039d316-1c4b-4281-b951-d872f2087c98