summaryrefslogtreecommitdiffstats
path: root/net/http
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Reverting, as this changelist broke unittests on Windows.markus@chromium.org2009-03-303-373/+98
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12816 0039d316-1c4b-4281-b951-d872f2087c98
* Change the bad-certificate handler for SSL (using NSS) to return anmarkus@chromium.org2009-03-303-98/+373
| | | | | | | | | | | | | | | | | | | | | | | error. This requires a few additional changes in the rest of the code. In particular, we now have to teach HttpNetworkTransaction about how to restart connections with bad certificates. This was originally intended to be done by ReconnectIgnoringLastError(), but that API turns out be very difficult to implement in the SSLClientSocket. So, instead, we just create a completely new SSLClientSocket. We also have to be careful to store a copy of the certificate from within the bad-certificate handler, as it won't be available by the time GetSSLInfo() is called. And we fix a bug that would cause us to erroneously talk SSL on reconnected TCP sockets, even though we were still supposed to negotiate a proxy tunnel first. Review URL: http://codereview.chromium.org/43115 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12809 0039d316-1c4b-4281-b951-d872f2087c98
* Add histogram of total latency when we're not re-using a socketjar@chromium.org2009-03-301-0/+7
| | | | | | | | | Trying to remove noise from latency experiment involving DNS prefetching. r=wtc Review URL: http://codereview.chromium.org/57016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12798 0039d316-1c4b-4281-b951-d872f2087c98
* After r12485, every POST request has an UploadData, even ifwtc@chromium.org2009-03-271-2/+3
| | | | | | | | | | | | | | | no data needs to be uploaded, so that we can set the identifier field in UploadData. So we should now enter the STATE_WRITE_BODY state only if request_body_stream_ has a nonzero size, so that we won't call connection_.socket()->Write() with zero bytes. R=darin BUG=9347 Review URL: http://codereview.chromium.org/42681 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12660 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent making real DNS lookups by chrome tests.phajdan.jr@chromium.org2009-03-271-1/+1
| | | | | | | | | | | | | | | | - by default a test which makes external DNS lookup directly or indirectly will fail - added a quite simple way to allow a test to make external queries - added a way to make external queries fail (for tests which don't need them to succeed but it's hard to not make the query) - made neccessary adjustments to existing tests so that they still pass http://crbug.com/9109 Review URL: http://codereview.chromium.org/45026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12653 0039d316-1c4b-4281-b951-d872f2087c98
* Respect cookies set in a 401 responses when restarting the http transaction.ericroman@google.com2009-03-2710-49/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two parts to this change: (1) rebuild the request cookies before each transaction restart for authentication (2) notify the URLRequestHttpJob of header completion before *each* transaction restart for authentication By "each transaction" I mean the automatic restarts that don't require user input, such as: - replying to the first step of NTLM - selecting identity embedded in URL - selecting identity in auth-cache Needing to notify URLRequestHttpJob for these intermediate restarts is a consequence of cookie store management being done outside of HttpNetworkTransaction. After updating the cookie store, URLRequestHttpJob now tests |HttpTransaction::IsReadyToRestartForAuth()| to check whether the notification was informational or an identity is actually needed. R=wtc BUG=6450 Review URL: http://codereview.chromium.org/51004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12635 0039d316-1c4b-4281-b951-d872f2087c98
* Treat all 1xx the same as a 100 (continue).ericroman@google.com2009-03-272-2/+49
| | | | | | | | BUG=8440 Review URL: http://codereview.chromium.org/53111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12634 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: First pass to make it possible to havervargas@google.com2009-03-253-24/+14
| | | | | | | | | | | | multiple instances of BackendImpl. We need multiple objects to be able to support media files on the cache. After this change, histograms will be the only thing that get messed up by multiple disk caches. Review URL: http://codereview.chromium.org/49027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12520 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 12479 which reverted 12470.willchan@chromium.org2009-03-252-12/+16
| | | | | | | This change is the same as 12470, except with HttpRequestInfo::priority initialized in the initializer list, which should fix the purify errors. Review URL: http://codereview.chromium.org/53066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12490 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 12470.willchan@chromium.org2009-03-252-15/+11
| | | | | | | caused purify errors Review URL: http://codereview.chromium.org/45055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12479 0039d316-1c4b-4281-b951-d872f2087c98
* Prioritize which HTTP requests get a socket first by adding a priority level ↵willchan@chromium.org2009-03-252-11/+15
| | | | | | | | | | to various methods and classes. Fix lint errors along the way. R=darin,wtc BUG=8993 Review URL: http://codereview.chromium.org/42541 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12470 0039d316-1c4b-4281-b951-d872f2087c98
* GetMyHostName is renamed GetHostName to match the name ofwtc@chromium.org2009-03-251-1/+1
| | | | | | | | | the Unix/Winsock function gethostname. R=eroman Review URL: http://codereview.chromium.org/42590 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12466 0039d316-1c4b-4281-b951-d872f2087c98
* Net module changes to support caching responses to a POST request.darin@chromium.org2009-03-244-46/+107
| | | | | | | | | | | The solution is to add a user-defined identifier to UploadData. If that identifier is set, and if the request method is POST, then HttpCache will enable caching for the response. (The cache key will be a composition of the identifier and the URL.) A subsequent POST request to the same URL with the same identifier will "hit" the previously generated cache entry. Reuse from the cache is subject to all of the standard rules. BUG=2636 R=wtc Review URL: http://codereview.chromium.org/52028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12374 0039d316-1c4b-4281-b951-d872f2087c98
* Computer total latency for DNS experimentjar@chromium.org2009-03-232-0/+11
| | | | | | | r=wtc Review URL: http://codereview.chromium.org/42518 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12296 0039d316-1c4b-4281-b951-d872f2087c98
* Make GetHostNameProc return a std::string.wtc@chromium.org2009-03-233-123/+113
| | | | | | | | | | | | | | | | | | | | Add the ScopedProcSetter helper class so that unit tests restore the original GenerateRandom and GetHostName functions on completion. Merge NTLMAuthModule into HttpAuthHandlerNTLM. The data members domain_, username_, and password_ are moved. The Init method is inlined at its only call site. The GetNextToken method is moved. Make generate_random_proc_ and get_host_name_proc_ static members of the HttpAuthHandlerNTLM class. R=eroman BUG=6567,6824 Review URL: http://codereview.chromium.org/43113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12290 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt to detect impact of disabling dns prefetching on transaction latencyjar@chromium.org2009-03-231-1/+8
| | | | | | | | | This is also meant to exercise the field trial infrastructure. r=mbelshe Review URL: http://codereview.chromium.org/50084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12271 0039d316-1c4b-4281-b951-d872f2087c98
* Fully reset HttpNetworkTransaction::response_ when restarting the ↵ericroman@google.com2009-03-218-11/+98
| | | | | | | | | | | | | transaction. The reset is done using the default constructor. This is less fragile than resetting each member manually, and in fact not all members were being reset (for example, vary_data and ssl_info). In the case of vary_data this could cause a subtle glitch, since calling HttpVaryData::Init() twice on the same object doesn't fully re-initialize. The changes outside of http_network_transaction.cc are just a safety net -- it seemed reasonable to make HttpVaryData::Init() support the multiple-init model. Review URL: http://codereview.chromium.org/50031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12243 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded uses of base/ref_counted.h.thestig@chromium.org2009-03-182-2/+2
| | | | | | Review URL: http://codereview.chromium.org/48105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11974 0039d316-1c4b-4281-b951-d872f2087c98
* Fix incorrect include guards in net/, where the guard didn't match the filename.deanm@chromium.org2009-03-172-6/+6
| | | | | | | | | Also add a guard to data_url.h which was missing a guard. Review URL: http://codereview.chromium.org/42282 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11865 0039d316-1c4b-4281-b951-d872f2087c98
* LogBlockedTunnelResponse only needs the response code aswtc@chromium.org2009-03-162-7/+6
| | | | | | | | | input. R=abarth Review URL: http://codereview.chromium.org/46053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11772 0039d316-1c4b-4281-b951-d872f2087c98
* Back out r11684, a temporary change for debugging issue 8325.wtc@chromium.org2009-03-161-4/+2
| | | | | | | | R=darin BUG=Issue 8325 Review URL: http://codereview.chromium.org/46074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11732 0039d316-1c4b-4281-b951-d872f2087c98
* Log an error message when we don't find anywtc@chromium.org2009-03-131-0/+20
| | | | | | | | | | | Proxy-Authenticate header that we support when establishing a tunnel. R=darin BUG=8771 Review URL: http://codereview.chromium.org/42193 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11685 0039d316-1c4b-4281-b951-d872f2087c98
* Temporarily use the Proxy-Connection header before thewtc@chromium.org2009-03-131-2/+4
| | | | | | | | | | | | Connection header in IsKeepAlive. This is an experiment to see if it allows us to do NTLM auth through Privoxy to a proxy. R=darin BUG=8325 Review URL: http://codereview.chromium.org/46061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11684 0039d316-1c4b-4281-b951-d872f2087c98
* Highlights of changes:hclam@chromium.org2009-03-133-4/+21
| | | | | | | | | | | | | | | | | | | 1. Added entry to ResourceResponseHead so that it contains either a base::PlatformFile (OS_WIN) or base::FileDescriptor (OS_POSIX) for passing the file handle from browser to renderer process. 2. Also added IPC messages for reporting download progress and ACK message for it. ResourceLoaderBridge::Peer::OnDownloadProgress is added so that the peer is notified of the download progress in the renderer process. 3. Load flag to kick start the resource loading for media files. LOAD_MEDIA_RESOURCE is added so that ResourceDispatcherHost knows how to use a different ResourceHandler for handling media resource request. Review URL: http://codereview.chromium.org/27168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11661 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unneeded uses of logging.h in header files.thestig@chromium.org2009-03-121-0/+1
| | | | | | Review URL: http://codereview.chromium.org/43148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11590 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up our fix for bug 7338 and bug 8473, which wentwtc@chromium.org2009-03-123-9/+16
| | | | | | | | | | through several iterations. R=abarth BUG=7338,8473 Review URL: http://codereview.chromium.org/42148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11589 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 11495 (since that reversion didn't heal plugin problem)jar@chromium.org2009-03-122-1/+73
| | | | | | | tbr=abarth Review URL: http://codereview.chromium.org/43112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11500 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 11484 to try to heal plugin_test failurejar@chromium.org2009-03-112-73/+1
| | | | | | | tbr=abarth Review URL: http://codereview.chromium.org/42101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11495 0039d316-1c4b-4281-b951-d872f2087c98