summaryrefslogtreecommitdiffstats
path: root/net/http
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Add a command line switch to enable flip sockets.mbelshe@google.com2009-10-132-1/+15
| | | | | | | | | | | | With this change, flip code is now compiled and the limited unit tests actually run. BUG=none TEST=none Review URL: http://codereview.chromium.org/259064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28793 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add a method to cancel pending sparse operations.rvargas@google.com2009-10-082-8/+130
| | | | | | | | | | | | | | | | | | | The sparse IO methods require exclusive use of the cache entry and they complain when that requirement is violated. When the user cancels a request and reissues another one to the same entry, we may be waiting for the previous operation to finish when we receive a new IO request, so we fail. This CL add a way for the HTTP cache to cancel IO operations and get a notification when the disk cache is able to operate on that entry again. BUG=23862 TEST=unittests Review URL: http://codereview.chromium.org/256090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28475 0039d316-1c4b-4281-b951-d872f2087c98
* Make HttpResponseInfo pickle'able, just moves some code from HttpCache to ↵michaeln@google.com2009-10-083-124/+150
| | | | | | | | | | | HttpResponseInfo. TEST=none BUG=none Review URL: http://codereview.chromium.org/269012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28363 0039d316-1c4b-4281-b951-d872f2087c98
* Initial CL for fixing some of the proxy auth issues.chron@chromium.org2009-10-065-2/+17
| | | | | | | | | | | | | | Auth_cache is contained in the http session. We need to share the http session with the parent profile request context in order to retain http authentication. Weirdly enough, Profile::GetDefaultRequestContext() is not the same as profile_->GetRequestContext(), It does NOT yet pop up a dialog if the user hasn't done so already. BUG=19581 TEST=Included. Review URL: http://codereview.chromium.org/241001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28086 0039d316-1c4b-4281-b951-d872f2087c98
* Increase the maximum headers size from 32Kb to 256Kb.eroman@chromium.org2009-10-062-3/+3
| | | | | | | | BUG=22928 Review URL: http://codereview.chromium.org/242152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28079 0039d316-1c4b-4281-b951-d872f2087c98
* Handle range request on a truncated entryhclam@chromium.org2009-10-023-3/+48
| | | | | | | | | | This change will doom the truncated entry and creates a new sparse entry. TEST=unit tests Review URL: http://codereview.chromium.org/251067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27859 0039d316-1c4b-4281-b951-d872f2087c98
* Handle reading to the end of a sparse entryhclam@chromium.org2009-10-012-0/+6
| | | | | | | | | | | | TEST=run chrome with --enable-byte-range-support --incognito and watch a video in http://tinyvid.tv/, seeking should be fine. http_cache::PartialData used to read a length of zero when reading has reached the end. The zero parameter will cause MemEntryImpl to complain about invalid argument, so early return for the case that we know we have nothing to read. Review URL: http://codereview.chromium.org/255034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27776 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the ClientSocketFactory from the HttpNetworkTransactionmbelshe@google.com2009-09-306-139/+60
| | | | | | | | | | | constructor and instead get it from the HttpNetworkLayer. BUG=none TEST=none Review URL: http://codereview.chromium.org/244032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27660 0039d316-1c4b-4281-b951-d872f2087c98
* Avoid potential "NULL used as int" warnings by changing ASSERT_EQ(NULL, ...) ↵pkasting@chromium.org2009-09-291-5/+5
| | | | | | | | | to ASSERT_TRUE(... == NULL). Patch by Jacob Mandelson (see http://codereview.chromium.org/202057 ), r=me. BUG=none TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27511 0039d316-1c4b-4281-b951-d872f2087c98
* Implement ScopedRunnableMethodFactory using WeakPtr.darin@chromium.org2009-09-252-20/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This required some changes to WeakPtr to support the addition of WeakPtrFactory::HasWeakPtrs(), which is used to implement ScopedRunnableMethodFactory::empty(). Now, the WeakReferenceOwner just holds a pointer to the Flag class, and the Flag holds a back-pointer that it can use to clear the WeakReferenceOwner's pointer when the Flag is destroyed. I use the null'ness of this back-pointer in place of the bool member that was previously used to indicate if the WeakReference is valid. It was also necessary to expose a HasOneRef method on RefCounted. I included one on RefCountedThreadSafe for completeness. Finally, I switched HttpCache over to using WeakPtr instead of RevocableStore so that I could delete RevocableStore. (I'm making this change to consolidate similar functionality.) R=abarth BUG=none TEST=none Review URL: http://codereview.chromium.org/235027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27287 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a redefined variable.eroman@chromium.org2009-09-241-1/+1
| | | | | | | | | | This got introduced with my changes to http_cache_unittest.cc. TBR=wtc Review URL: http://codereview.chromium.org/231011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27039 0039d316-1c4b-4281-b951-d872f2087c98
* Replace some net::ERR_FAILED generic error codes with more specific codes.eroman@chromium.org2009-09-248-80/+118
| | | | | | | | | | The goal is to end up with more meaningful errors if a page fails to load. BUG=22623 Review URL: http://codereview.chromium.org/222009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27038 0039d316-1c4b-4281-b951-d872f2087c98
* Because we use scoped_refptr<> to the HttpResponseInfombelshe@google.com2009-09-221-3/+2
| | | | | | | | | | | | | and SSLCertRequestInfo, simply declaring the forward class definition is not enough to include this header. This header is really dependent on those two class definitions. BUG=none TEST=none Review URL: http://codereview.chromium.org/216032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26854 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 25873.eroman@chromium.org2009-09-223-89/+35
| | | | | | | | | | | This appears to be responsible for a regression in downloading of files. BUG=http://crbug.com/406 TBR=darin Review URL: http://codereview.chromium.org/215035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26764 0039d316-1c4b-4281-b951-d872f2087c98
* Allow the realm in BASIC and DIGEST challenges to not be specified.eroman@chromium.org2009-09-215-11/+74
| | | | | | | | | | | | This goes against RFC 2617 which states they are required parameters, but apparently there are servers which do this, and other browsers are less strict. Also allow the empty string as a valid realm value (previously this was being disallowed as an implementation bug to check if it was not specified). BUG=12565,20984 Review URL: http://codereview.chromium.org/211040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26723 0039d316-1c4b-4281-b951-d872f2087c98
* We should pass the service principal name (SPN) of thewtc@chromium.org2009-09-189-59/+44
| | | | | | | | | | | | | | | | format "HTTP/host:port" as the third argument (pszTargetName) to InitializeSecurityContext. This requires adding a host_and_port parameter to some methods. Remove obsolete (and incorrect) logging code in HttpNetworkTransaction::PrepareForAuthRestart(). R=eroman BUG=18009 TEST=none Review URL: http://codereview.chromium.org/206022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26588 0039d316-1c4b-4281-b951-d872f2087c98
* Addressing two comments from Darin.tommi@chromium.org2009-09-181-2/+1
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/216021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26551 0039d316-1c4b-4281-b951-d872f2087c98
* Moving two http utility functions to a separate source file due to ↵tommi@chromium.org2009-09-182-16/+32
| | | | | | | | | | | | | dependency on icu. This allows usage of e.g. HeadersIterator without pulling in all of icu. TEST=no code change. BUG=none Review URL: http://codereview.chromium.org/213017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26545 0039d316-1c4b-4281-b951-d872f2087c98
* More correctly handle username and password in FtpNetworkTransaction.phajdan.jr@chromium.org2009-09-163-83/+1
| | | | | | | | | | | | - prevent newline injection attacks - correctly unescape credentials provided in the URL TEST=Covered by net_unittests. http://crbug.com/20336 Review URL: http://codereview.chromium.org/183046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26305 0039d316-1c4b-4281-b951-d872f2087c98
* Add a histogram for measuring SSL Connect times.mbelshe@google.com2009-09-112-2/+14
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/194035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25956 0039d316-1c4b-4281-b951-d872f2087c98
* Move StringPiece into the base namespace. It is collidingtony@chromium.org2009-09-102-8/+8
| | | | | | | | | | with the StringPiece class in icu4.2, which is a problem when trying to use the system version of icu. Review URL: http://codereview.chromium.org/193072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25920 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Convert data writes from sysnchronous to asynchronous.rvargas@google.com2009-09-103-35/+89
| | | | | | | | | | BUG=21383 TEST=covered by current unit tests. Review URL: http://codereview.chromium.org/201065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25873 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Don't delete sparse entries when wervargas@google.com2009-09-092-11/+54
| | | | | | | | | | | cancel the request. BUG=20930 TEST=unittests Review URL: http://codereview.chromium.org/193043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25736 0039d316-1c4b-4281-b951-d872f2087c98
* Add some trace-points to HttpCache for request profiling (cache entry ↵eroman@chromium.org2009-09-062-13/+89
| | | | | | | | | | | "open", "create", "waiting" and "read_info"). BUG=http://crbug.com/14478 TEST=HttpCache unittests. Review URL: http://codereview.chromium.org/201035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25583 0039d316-1c4b-4281-b951-d872f2087c98
* Bug fixing for range request support in HttpCachehclam@chromium.org2009-09-053-2/+36
| | | | | | | | | | | | | | | | | | | TEST=net_unittests --gtest_filter=HttpCache.GET_Previous206_NotModified Step to reproduce the failure: 1. Sparse cache has data for (0 - 9) 2. Make a non-range request for the resource 3. Server replies with 304 not modified 4. User would get 304 modified while 200 is expected The cause is that PartialData::ResponseHeadersOK requires a full specified range to accept the response when server replies with 304. This is not a valid assumption as the response of 304 can be caused by the cache submitting a range request for validation purpose. Review URL: http://codereview.chromium.org/198018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25569 0039d316-1c4b-4281-b951-d872f2087c98
* [Second attempt of r25461]wtc@chromium.org2009-09-058-703/+1092
| | | | | | | | | | | | | | | | | | | | | | | Use SSPI for NTLM authentication on Windows. Add an explicit embedded_identity_used_ boolean member to make sure we use the username/password in the URL only once for the transaction. This allows us to reset auth_identity_[target].source to HttpAuth::IDENT_SRC_NONE after auth failed. Initial patch by Arindam. Original review URL: http://codereview.chromium.org/159656 R=arindam,eroman BUG=19,18009,20560 TEST=1. Open a webpage that requests NTLM authentication on Windows. 2. New unit test for wrong auth identity in URL. Review URL: http://codereview.chromium.org/193022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25564 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Add support for resuming downloading arvargas@google.com2009-09-045-44/+282
| | | | | | | | | | | | resource after the original request was interrupted. BUG=8995 TEST=unittests Review URL: http://codereview.chromium.org/197016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25551 0039d316-1c4b-4281-b951-d872f2087c98
* Update the request time of http cache entries on 304.eroman@chromium.org2009-09-044-6/+25
| | | | | | | | | BUG=http://crbug.com/20594 TEST=HttpCache.UpdatesRequestResponseTimeOn304 Review URL: http://codereview.chromium.org/199028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25541 0039d316-1c4b-4281-b951-d872f2087c98
* Re-enabled URLRequestTestHTTP.BasicAuth.eroman@chromium.org2009-09-041-2/+2
| | | | | | | | | | | | The problem was the test was expecting |response_time| of cached responses to be the timestamp of the original request, rather than the timestamp of the last cache validation. Also updated the header to clarify what |request_time| and |response_time| correspond to in the cached cases. BUG=http://crbug.com/20594 Review URL: http://codereview.chromium.org/197030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25540 0039d316-1c4b-4281-b951-d872f2087c98
* Update the response time of http cache entries on 304.eroman@chromium.org2009-09-044-6/+98
| | | | | | | | | BUG=http://crbug.com/20594 TEST=HttpCacheTest.UpdatesResponseTimeOn304 Review URL: http://codereview.chromium.org/197024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25484 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Use SSPI for NTLM authentication on Windows."agl@chromium.org2009-09-047-968/+697
| | | | | | | This reverts commit r25461. It looks like it broke failed-auth.html git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25471 0039d316-1c4b-4281-b951-d872f2087c98
* Use SSPI for NTLM authentication on Windows.wtc@chromium.org2009-09-047-697/+968
| | | | | | | | | | | | | | Initial patch by Arindam. Original review URL: http://codereview.chromium.org/159656 R=arindam,eroman BUG=19,18009 TEST=open a webpage that requests NTLM authentication on Windows Review URL: http://codereview.chromium.org/173528 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25461 0039d316-1c4b-4281-b951-d872f2087c98
* Display the LoadLogs for recent and in-progress URLRequests on the ↵eroman@chromium.org2009-09-031-1/+2
| | | | | | | | | | net-internals page. BUG=http://crbug.com/14478 Review URL: http://codereview.chromium.org/184008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25358 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: reorder some functions. No code change.rvargas@google.com2009-09-011-77/+74
| | | | | | | | | | | | | I'm just making the order of the methods match the order of declaration again. BUG=nonde TEST=none Review URL: http://codereview.chromium.org/175042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25062 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Cleanup from tracking of bug 9952.rvargas@google.com2009-09-012-68/+12
| | | | | | | | | BUG=9952 TEST=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24992 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Fix a ton of compiler warnings."tony@chromium.org2009-08-281-5/+5
| | | | | | | | | | | This reverts commit r24792. TBR=estade Review URL: http://codereview.chromium.org/179028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24796 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a ton of compiler warnings.estade@chromium.org2009-08-281-5/+5
| | | | | | | | | | | | | | | Most of these are classes with virtual methods lacking virtual destructors or NULL used in non-pointer context. BUG=none TEST=app_unittests && base_unittests --gtest_filter=-ConditionVariableTest.LargeFastTaskTest patch by Jacob Mandelson <jlmjlm [at] gmail> http://codereview.chromium.org/171028/show git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24792 0039d316-1c4b-4281-b951-d872f2087c98