summaryrefslogtreecommitdiffstats
path: root/net/http
Commit message (Collapse)AuthorAgeFilesLines
* Merge 33919 - Http cache: Don't use multiple validation headers whenmal@chromium.org2009-12-051-1/+3
| | | | | | | | | | | | | | | | dealing with byte range requests. Some servers are not happy with that. BUG=25859 TEST=none Review URL: http://codereview.chromium.org/460098 TBR=rvargas@google.com Review URL: http://codereview.chromium.org/464055 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@33920 0039d316-1c4b-4281-b951-d872f2087c98
* Merge 33580 - Http cache: Don't access entry_ if an error switchesrvargas@google.com2009-12-032-1/+39
| | | | | | | | | | | | | | | the transaction to mode NONE and deletes the entry_. BUG=28994 TEST=unittests Review URL: http://codereview.chromium.org/449069 TBR=rvargas@google.com Review URL: http://codereview.chromium.org/465018 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@33637 0039d316-1c4b-4281-b951-d872f2087c98
* Merge 33412 - Http cache: Add code to restart a network request when thervargas@google.com2009-12-015-28/+101
| | | | | | | | | | | | | | | server doesn't revalidate a partially stored entry, in other words, after we issued a conditional byte range request. BUG=27276, 28850 TEST=unittests Review URL: http://codereview.chromium.org/452017 TBR=rvargas@google.com Review URL: http://codereview.chromium.org/455019 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@33426 0039d316-1c4b-4281-b951-d872f2087c98
* Merge 33253 - Revert 33133 Http cache: Add code to restart a network ↵rvargas@google.com2009-11-305-94/+28
| | | | | | | | | | | | | | | | | | | | | | request when the server doesn't revalidate a partially stored entry, in other words, after we issued a conditional byte range request. (aka, revert 33153 from 249) BUG=27276, 28850 TEST=unittests Review URL: http://codereview.chromium.org/434052 TBR=rvargas@google.com Review URL: http://codereview.chromium.org/452003 TBR=rvargas@google.com Review URL: http://codereview.chromium.org/448003 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@33254 0039d316-1c4b-4281-b951-d872f2087c98
* Merge 33133 - Http cache: Add code to restart a network request when thervargas@google.com2009-11-255-28/+94
| | | | | | | | | | | | | | | server doesn't revalidate a partially stored entry, in other words, after we issued a conditional byte range request. BUG=27276 TEST=unittests Review URL: http://codereview.chromium.org/434052 TBR=rvargas@google.com Review URL: http://codereview.chromium.org/437074 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@33153 0039d316-1c4b-4281-b951-d872f2087c98
* Merge 32983 - Increase the maximum allowed read buffer to 2MB.vandebo@google.com2009-11-253-3/+6
| | | | | | | | | | BUG=28670 TEST=DevToolsSanityTest Review URL: http://codereview.chromium.org/435015 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@33037 0039d316-1c4b-4281-b951-d872f2087c98
* Recommit this change - follow up merge will fix the issue detected on trunkvandebo@google.com2009-11-253-14/+27
| | | | | | | | | | | | | | | with it. Merge 32856 - A large ContentLength header followed by a connection close could trigger an out of memory condition. Fixed problem, added unit test, and clarified the API. This is probably the real problem in issue 25826. BUG=28346, 25826 TEST=HttpNetworkTransactionTest.LargeContentLengthThenReset Review URL: http://codereview.chromium.org/418035 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@33036 0039d316-1c4b-4281-b951-d872f2087c98
* This looked good on trunk, but an issue was tracked down after I merged. ↵vandebo@google.com2009-11-243-27/+14
| | | | | | | | | | | | | | | | Reverting for now. Revert 32902 - Merge 32856 A large ContentLength header followed by a connection close could trigger an out of memory condition. Fixed problem, added unit test, and clarified the API. This is probably the real problem in issue 25826. BUG=28346, 25826 TEST=HttpNetworkTransactionTest.LargeContentLengthThenReset Review URL: http://codereview.chromium.org/418035 TBR=tony@chromium.org git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@32907 0039d316-1c4b-4281-b951-d872f2087c98
* Merge 32856 - A large ContentLength header followed by a connection close ↵vandebo@google.com2009-11-243-14/+27
| | | | | | | | | | | | could trigger an out of memory condition. Fixed problem, added unit test, and clarified the API. This is probably the real problem in issue 25826. BUG=28346, 25826 TEST=HttpNetworkTransactionTest.LargeContentLengthThenReset Review URL: http://codereview.chromium.org/418035 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@32902 0039d316-1c4b-4281-b951-d872f2087c98
* Merge 32707 - Http cache: Make sure that when we cancel a request forrvargas@google.com2009-11-212-1/+68
| | | | | | | | | | | | | | | | a truncated entry, we keep the truncation flag. BUG=27276 TEST=unittests Review URL: http://codereview.chromium.org/422002 TBR=rvargas@google.com Review URL: http://codereview.chromium.org/428003 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@32723 0039d316-1c4b-4281-b951-d872f2087c98
* Merge 32555 - In RestartIgnoringLastError, use ↵wtc@chromium.org2009-11-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | connection_.socket()>IsConnectedAndIdle() instead of connection_.socket()>IsConnected() to check if the connection is still alive, to work around a weakness of our SSLClientSocket::IsConnected implementation, which treats the SSL close_notify alert sent by the server as data received and considers the connection to be still alive. R=hawk BUG=11875 TEST=Visit an HTTPS site with a certificate error such as https://etrade.com/ or https://alioth.debian.org/. When the SSL interstitial page is displayed, wait a few minutes until the server closes the connection. (On Windows, use Sysinternals' TCPView tool to verify the connection is in CLOSE_WAIT state or gone.) Then click the "Proceed anyway" button. We should not get the net::ERR_EMPTY_RESPONSE or net::ERR_CONNECTION_ABORTED error. Review URL: http://codereview.chromium.org/403029 TBR=wtc@chromium.org Review URL: http://codereview.chromium.org/422004 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@32667 0039d316-1c4b-4281-b951-d872f2087c98
* Merge 32523 - Http cache: Add the logic to cancel entry_ready_callback_.rvargas@google.com2009-11-192-1/+109
| | | | | | | | | | | | BUG=28204 TEST=unittests Review URL: http://codereview.chromium.org/403027 TBR=rvargas@google.com Review URL: http://codereview.chromium.org/410007 git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@32569 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash if we get an EOF after a large packet with unterminated headers.cevans@chromium.org2009-11-131-1/+1
| | | | | | | | | | | Make sure we always start copying excess data to the start of the read buffer, even in the case where save_amount==0 and additional_save_amount!=0 BUG=27509 TEST=NONE Review URL: http://codereview.chromium.org/385088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31939 0039d316-1c4b-4281-b951-d872f2087c98
* Add LoadLog instrumentation to HttpNetworkTransaction, to tell how much time ↵eroman@chromium.org2009-11-131-0/+18
| | | | | | | | was spent reading/writing headers and reading/writing body. Review URL: http://codereview.chromium.org/384098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31861 0039d316-1c4b-4281-b951-d872f2087c98
* After draining the body of a 401/407 response, verify thatwtc@chromium.org2009-11-122-7/+94
| | | | | | | | | | | | | | | | | the keep-alive connection is still connected and idle before reusing it for authentication restart. An impatient server may have closed the connection while waiting for the user to enter the username and password. In socket_test_util.cc, return the mock ERR_UNEXPECTED error synchronously. R=eroman BUG=21675 TEST=new unit test Review URL: http://codereview.chromium.org/389007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31846 0039d316-1c4b-4281-b951-d872f2087c98
* Map a return value of 0 to ERR_CONNECTION_CLOSED forwtc@chromium.org2009-11-121-19/+16
| | | | | | | | | | | | | connection_->socket()->Read() in DoReadHeadersComplete and DoReadBodyComplete so that we catch both synchronous and asynchronous completion of Read. R=vandebo BUG=13289 TEST=none Review URL: http://codereview.chromium.org/384047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31739 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Split HttpCache::Transaction to its own setrvargas@google.com2009-11-113-1582/+1639
| | | | | | | | | | | | | of files. No real code change... I'm just moving code around. BUG=26729 TEST=none Review URL: http://codereview.chromium.org/387017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31693 0039d316-1c4b-4281-b951-d872f2087c98
* There was confusion in the mock socket classes due tombelshe@google.com2009-11-112-155/+155
| | | | | | | | | | | | | | | | | | | overlapping names. The MockSocket is not actually a socket. It is an interface for fetching data for reads and writes on a socket. The MockClientSocket and MockTCPClientSocket are the actual sockets. Rename MockSocket to SocketDataProvider. Rename SSLMockSocket to SSLSocketDataProvider. Update all tests to reflect name change. BUG=none TEST=none Review URL: http://codereview.chromium.org/384024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31640 0039d316-1c4b-4281-b951-d872f2087c98
* After further discussion, do not try to handle memory errors, but make ↵vandebo@chromium.org2009-11-101-13/+5
| | | | | | | | | | | assertions about allocation parameters stronger. BUG=25826 TEST=none Review URL: http://codereview.chromium.org/378037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31574 0039d316-1c4b-4281-b951-d872f2087c98
* Clear disk cache when the cache is not initializedhclam@chromium.org2009-11-073-21/+36
| | | | | | | | | | | | | | BUG=24765 TEST=unit test, clear browsing data and the cache, media cache will be cleared even if a media object was not loaded. Since the disk cache backend in HttpCache is lazily initialized, clearing the cache before it receives the first transaction would have no effect. So initialize the disk cache explicitly when we clear the cache. Review URL: http://codereview.chromium.org/378015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31361 0039d316-1c4b-4281-b951-d872f2087c98
* Improve the display of LoadLogs when truncation occurs.eroman@chromium.org2009-11-061-3/+3
| | | | | | | | | | | | | | Rather than drop all subsequent entries, we now preserve the final entry that was appended to the log. This way, even if entries have been dropped, we can still infer what the total time was, and what the exit condition was. Also makes LoadLog take the bound as a required parameter. BUG=none TEST=LoadLogUtilTest.DisplayOfTruncated Review URL: http://codereview.chromium.org/363025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31274 0039d316-1c4b-4281-b951-d872f2087c98
* Second patch in making destructors of refcounted objects private.jam@chromium.org2009-11-057-8/+20
| | | | | | | | BUG=26749 Review URL: http://codereview.chromium.org/368001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31165 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: New interface that enables asynchronous completionrvargas@google.com2009-11-051-0/+35
| | | | | | | | | | | of any operation that may block. BUG=26730 TEST=none Review URL: http://codereview.chromium.org/355028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31160 0039d316-1c4b-4281-b951-d872f2087c98
* HTTP cache: Add tests to verify that we don't remove thervargas@google.com2009-11-051-5/+50
| | | | | | | | | | | | request headers for simple and externally conditionalized requests. BUG=NONE TEST=unittests Review URL: http://codereview.chromium.org/361022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31108 0039d316-1c4b-4281-b951-d872f2087c98
* Flip: FlipSessionPool changes.willchan@chromium.org2009-11-045-8/+32
| | | | | | | | | | | (1) Move it into the HttpNetworkSession so that HttpNetworkTransaction can access it. This is in anticipation of switching HTTP/HTTPS connections over to FLIP. (2) Add some more functionality to FlipSessionPool, allowing HttpNetworkTransactions to check for the existence of other, reusable FlipSessions. Review URL: http://codereview.chromium.org/348066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30909 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Make sure that we handle byte range requests thatrvargas@google.com2009-11-032-3/+30
| | | | | | | | | | | | end up skipping the cache. BUG=26175 TEST=unittests Review URL: http://codereview.chromium.org/348053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30877 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Always preserve extra headers when dealing withrvargas@google.com2009-11-034-26/+48
| | | | | | | | | | | byte range requests. BUG=25755 TEST=unittests Review URL: http://codereview.chromium.org/339088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30773 0039d316-1c4b-4281-b951-d872f2087c98
* Add LoadLog to ClientSocket::Connect().willchan@chromium.org2009-11-021-2/+2
| | | | | | | | TODO: Use LoadLog in FLIP code. Review URL: http://codereview.chromium.org/344026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30765 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Allow multiple external validation headers.rvargas@google.com2009-11-022-55/+153
| | | | | | | | | | | | If the last pair of headers match the entry that we have we allow the server response to update the entry. BUG=23222 TEST=unittests Review URL: http://codereview.chromium.org/345019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30748 0039d316-1c4b-4281-b951-d872f2087c98
* Minor defense-in-depth tweak. end - start + 1 can actually go negative ifcevans@chromium.org2009-10-281-1/+1
| | | | | | | | | | | | start==0 and end==9223372036854775807, i.e. the full positive range of a 64-bit signed int. BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/346003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30363 0039d316-1c4b-4281-b951-d872f2087c98
* Handle out of memory in GrowableIOBuffer more gracefully.vandebo@chromium.org2009-10-281-7/+17
| | | | | | | | | BUG=25826 TEST=none Review URL: http://codereview.chromium.org/338049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30287 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Handle byte range requests when there is no cache entry.rvargas@google.com2009-10-272-0/+16
| | | | | | | | | | BUG=25873 TEST=unittest Review URL: http://codereview.chromium.org/330026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30165 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Make sure that we remove pending transactionsrvargas@google.com2009-10-263-3/+70
| | | | | | | | | | | when they belong to a doomed entry. BUG=25588 TEST=unittests Review URL: http://codereview.chromium.org/335015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30054 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify the copying of data in HttpStreamParservandebo@chromium.org2009-10-231-17/+25
| | | | | | | | | | | Add a CHECK BUG=25554 TEST=none Review URL: http://codereview.chromium.org/327005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29956 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes ChromeFrame net tests which run the URLRequest unit tests by launching ↵ananta@chromium.org2009-10-232-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | IE and having it issue the corresponding HTTP requests via automation. Fixes as below:- 1. The DefaultAcceptCharset and DefaultAcceptLanguage tests were failing because the URL request automation job would only read the extra headers from the request. These tests set these headers in the URLRequestContext. We needed to mimic the functionality in the URLRequestHttpJob to add in these headers if they were not already present. As part of this I moved the AppendHeaderIfMissing function from url_request_http_job.cc to HttpUtil as it is needed by the automation job as well. 2. The OverrideAcceptLanguage and OverrideAcceptCharset tests started failing in chrome frame net tests after the fixes to get the default versions of these tests to pass. These tests basically pass in the Accept-Language and Accept-Charset headers and expect the same values to be echoed back. IE ends up caching the responses from the default versions of these tests and thus echoes back the old response which causes these tests to fail. I tried passing in the no-cache header from our HTTP server for the EchoHeader tests but this did not work. To fix this we now pass in the echoheaderoverride parameter for the OverrideAcceptLanguage and OverrideAcceptCharset tests. The HTTP server has been updated to support this. 3. NotifyDone can be called on the job if the original request was redirected. Added a check for whether NotifyDone was already called on the job in URLRequestAutomationJob Review URL: http://codereview.chromium.org/322004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29895 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Convert data writes from sysnchronous to asynchronous.rvargas@google.com2009-10-223-43/+138
| | | | | | | | | | BUG=21383 TEST=unit tests (original review for r25873: http://codereview.chromium.org/201065) Review URL: http://codereview.chromium.org/313013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29792 0039d316-1c4b-4281-b951-d872f2087c98
* Expand the options for how FLIP runs. The GFE team needsmbelshe@google.com2009-10-212-4/+26
| | | | | | | | | | | | the ability to run a client with ssl & compression turned off. Update the command line to accomodate. BUG=none TEST=none Review URL: http://codereview.chromium.org/315006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29741 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor HttpNetworkTransaction so that HttpStream is responsible for ↵vandebo@chromium.org2009-10-178-634/+1239
| | | | | | | | | | | | | parsing the Http traffic. HttpBasicStream delegates parsing to HttpStreamParser in preparation for HttpPipelinedStream. Original review: http://codereview.chromium.org/249031 BUG=13289 TEST=unittests Review URL: http://codereview.chromium.org/283022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29379 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Enable byte-range support by default.rvargas@google.com2009-10-161-4/+4
| | | | | | | | | | | | | | | The command line parameter to modify the behavior changes from --enable-byte-range-support to --disable-byte-range-support BUG=24989 TEST= current tests Review URL: http://codereview.chromium.org/267132 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29337 0039d316-1c4b-4281-b951-d872f2087c98
* Adding support for Reset in StringTokenizerT and HttpHeadersIterator.tommi@chromium.org2009-10-162-0/+17
| | | | | | | | | TEST=Run HeadersIterator_Reset and the Reset test for StringTokenizer BUG=none Review URL: http://codereview.chromium.org/276067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29330 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 29316.vandebo@chromium.org2009-10-168-1239/+634
| | | | | | Review URL: http://codereview.chromium.org/292002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29320 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor HttpNetworkTransaction so that HttpStream is responsible for ↵vandebo@chromium.org2009-10-168-634/+1239
| | | | | | | | | | | parsing the Http traffic. HttpBasicStream delegates parsing to HttpStreamParser in preparation for HttpPipelinedStream. BUG=13289 TEST=unittests Review URL: http://codereview.chromium.org/249031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29316 0039d316-1c4b-4281-b951-d872f2087c98
* HTTP Cache: Apply all freshness tests to Partial content entries.rvargas@google.com2009-10-163-4/+29
| | | | | | | | | BUG=24057 TEST=unittest Review URL: http://codereview.chromium.org/267122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29301 0039d316-1c4b-4281-b951-d872f2087c98
* Adding a Find method to the HeadersIterator class.tommi@chromium.org2009-10-163-0/+34
| | | | | | | | | TEST=Run the HeadersIterator_Find test. BUG=none Review URL: http://codereview.chromium.org/273072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29273 0039d316-1c4b-4281-b951-d872f2087c98
* Convert the HTTP cache to use FilePath rather than wstring for thetony@chromium.org2009-10-152-9/+9
| | | | | | | | | | disk cache path. BUG=24672 Review URL: http://codereview.chromium.org/276048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29213 0039d316-1c4b-4281-b951-d872f2087c98
* net: Add another unit test.rvargas@google.com2009-10-151-0/+7
| | | | | | | | | | | I forgot to add a test case that was failing before r29035 BUG=b/2071330 TEST=unittests Review URL: http://codereview.chromium.org/281004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29157 0039d316-1c4b-4281-b951-d872f2087c98
* Final patch to convert disk cache to using FilePath instead oftony@chromium.org2009-10-151-2/+3
| | | | | | | | | | | wstring. After this patch, I'm able to start chrome in a user data dir with non-ascii characters on non-utf8 systems. BUG=24444 Review URL: http://codereview.chromium.org/267085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29136 0039d316-1c4b-4281-b951-d872f2087c98
* Don't call AuthOrigin(target) multiple times inwtc@chromium.org2009-10-152-16/+22
| | | | | | | | | | | | | | | HandleAuthChallenge. Add a "const GURL& auth_origin" parameter to PopulateAuthChallenge, InvalidateRejectedAuthFromCache, and SelectNextAuthIdentityToTry to eliminate the AuthOrigin(target) calls in those three functions. R=eroman BUG=22264 TEST=none Review URL: http://codereview.chromium.org/277005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29129 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: More unit tests for byte range support.rvargas@google.com2009-10-145-51/+209
| | | | | | | | | BUG=b/2071330 TEST=unittests Review URL: http://codereview.chromium.org/267101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29035 0039d316-1c4b-4281-b951-d872f2087c98
* Add an interface to report the amount of data after a chunked encoding. This ↵vandebo@chromium.org2009-10-133-13/+56
| | | | | | | | | | | will be needed for pipelining. Separated out of http://codereview.chromium.org/249031. BUG=13289 TEST=existing and added unittests Review URL: http://codereview.chromium.org/267042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28833 0039d316-1c4b-4281-b951-d872f2087c98