summaryrefslogtreecommitdiffstats
path: root/net/http
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Http cache: Bypass the cache for range requests that have validation headers.rvargas@google.com2009-08-282-1/+41
| | | | | | | | | BUG=20017 TEST=unittests Review URL: http://codereview.chromium.org/177016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24759 0039d316-1c4b-4281-b951-d872f2087c98
* Add the ability to not send cookies or send user name/password.levin@chromium.org2009-08-262-6/+54
| | | | | | | | | | | Added unit tests for the above functionality plus the do not save cookies functionality. BUG=http://crbug.com/10961 TEST=Added unit tests for this. Also, this isn't yet called from the rest of the code. Review URL: http://codereview.chromium.org/173206 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24412 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor function to unpack an Entry from its pickle to a HttpResponseInfo.mbelshe@google.com2009-08-252-12/+22
| | | | | | | | | | | This will be used for some dump_cache modifications which are coming. BUG=none TEST=none Review URL: http://codereview.chromium.org/174388 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24319 0039d316-1c4b-4281-b951-d872f2087c98
* Add UMA Histogram for FieldTrial for Async Socket SlowStartmbelshe@google.com2009-08-251-1/+14
| | | | | | | | | | | | algorithm to monitor the time between the connect and the first byte on a new connection. BUG=none TEST=none Review URL: http://codereview.chromium.org/174390 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24221 0039d316-1c4b-4281-b951-d872f2087c98
* Only retry on unused, idle sockets if the socket error is ERR_CONNECTION_RESET.willchan@chromium.org2009-08-242-5/+8
| | | | | | | | | In particular, don't do it on ERR_CONNECTION_ABORT or ERR_CONNECTION_CLOSED. Fix spelling error in ClientSocketHandle comment. Review URL: http://codereview.chromium.org/173278 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24152 0039d316-1c4b-4281-b951-d872f2087c98
* Add more histograms to understand idle sockets.willchan@chromium.org2009-08-241-10/+50
| | | | | | | | | Add Net.SocketIdleTimeBeforeNextUse histograms to track how long a socket is idle before being requested again. Replace Net.SocketIdleTimeOnIOError with Net.SocketIdleTimeOnIOError2 which raises the sample max to 6 seconds and increases to 100 buckets. I had incorrectly misread the code and assumed we closed idle sockets after 10 seconds. We close idle sockets between 5 minutes and 5 minutes and 10 seconds of idle time. Review URL: http://codereview.chromium.org/173256 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24130 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Enable experimental support for byte range requests.rvargas@google.com2009-08-243-39/+56
| | | | | | | | | | | Requires --enable-byte-range-support BUG=12258 TEST=covered by unit tests. Review URL: http://codereview.chromium.org/173231 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24113 0039d316-1c4b-4281-b951-d872f2087c98
* Resend on IO errors on late bound sockets that were idle.willchan@chromium.org2009-08-221-1/+2
| | | | | | | | | | | According to UMA data, late bound sockets that were idle are significantly more likely to get (reset/close/abort) errors. Currently, we don't resend on late bound sockets that were idle because they weren't reused. This changes that. TODO: determine how long a socket has to be idle before it is likely to get a TCP RST if we try to reuse it. Also document the ClientSocketHandle::ReuseSocketType values. BUG=http://crbug.com/18192. Review URL: http://codereview.chromium.org/174287 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24084 0039d316-1c4b-4281-b951-d872f2087c98
* Revert cl 24015rvargas@google.com2009-08-213-55/+39
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/174260 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24026 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Enable experimental support for byte range requests.rvargas@google.com2009-08-213-39/+55
| | | | | | | | | | | Requires --enable-byte-range-support BUG=12258 TEST=covered by unit tests. Review URL: http://codereview.chromium.org/173173 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24015 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanups for SSLConfigService and SSLConfigServiceManager.mattm@chromium.org2009-08-211-1/+1
| | | | | | | | | | | | | | | | | Make SSLConfig.rev_checking_enable default to true (which also affects the defaults set by SSLConfigServicePref.) Add static SSLConfigService::CreateSystemSSLConfigService which creates a standalone SSLConfigService (either SSLConfigServiceWin or SSLConfigServiceDefaults.) Use CreateSystemSSLConfigService in fetch_client and test_shell_request_context. Merge SSLConfigServiceManagerWin and SSLConfigServiceManagerDefaults into SSLConfigServiceManagerSystem, which uses CreateSystemSSLConfigService. BUG=11507,19290 TEST=only visible change should be linux defaults to having rev checking option enabled. Review URL: http://codereview.chromium.org/173097 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23998 0039d316-1c4b-4281-b951-d872f2087c98
* Pulling new version of googleurl into the tree.cira@chromium.org2009-08-211-4/+2
| | | | | | | | | | Fixing a net_unittest case that wasn't updated when googleurl code was changed (but not down integrated to chrome). BUG=5490 Review URL: http://codereview.chromium.org/174093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23965 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Fix the code that handles 206s when revalidatingrvargas@google.com2009-08-203-22/+91
| | | | | | | | | | | a range from the cache. BUG=12258 TEST=unittests Review URL: http://codereview.chromium.org/174039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23881 0039d316-1c4b-4281-b951-d872f2087c98