summaryrefslogtreecommitdiffstats
path: root/net/http
Commit message (Collapse)AuthorAgeFilesLines
* Use 0 for successful end of stream.vandebo@chromium.org2010-03-083-17/+12
| | | | | | | | | BUG=25032 TEST=none Review URL: http://codereview.chromium.org/669122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40938 0039d316-1c4b-4281-b951-d872f2087c98
* net: string_utils.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-084-0/+6
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/668267 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40935 0039d316-1c4b-4281-b951-d872f2087c98
* Add checks to track down bug 31096vandebo@chromium.org2010-03-081-0/+3
| | | | | | | | | BUG=31096 TEST=none Review URL: http://codereview.chromium.org/669226 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40934 0039d316-1c4b-4281-b951-d872f2087c98
* More late binding cleanupvandebo@chromium.org2010-03-051-36/+0
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/668106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40692 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a regression introduced in r40465.wtc@chromium.org2010-03-051-11/+18
| | | | | | | | | | | | | | | | | In DoSSLConnectComplete, we still need to set using_spdy_ if we get a certificate error. In HandleCertificateError, we need to ignore the error after adding the certificate to the allowed_bad_certs list. R=mbelshe BUG=37367 TEST=Connect to a SPDY server with a bad certificate. Clicking "Proceed anyway" in the SSL blocking page should not result in a download. Review URL: http://codereview.chromium.org/668111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40687 0039d316-1c4b-4281-b951-d872f2087c98
* Remove debug info used to diagnose bug 31723.rvargas@google.com2010-03-031-12/+0
| | | | | | | | | BUG=31723 TEST=none Review URL: http://codereview.chromium.org/660431 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40570 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the remnants of the late binding experiment.vandebo@chromium.org2010-03-031-32/+0
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/667013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40562 0039d316-1c4b-4281-b951-d872f2087c98
* Don't ignore certificate errors with SPDY.mbelshe@chromium.org2010-03-032-19/+23
| | | | | | | | | | | | | | For benchmarking and testing, we still want to be able to ignore the certificate errors, so I added a flag to the use-spdy option to do so: --ignore-certificate-errors BUG=32020 TEST=none Review URL: http://codereview.chromium.org/661375 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40465 0039d316-1c4b-4281-b951-d872f2087c98
* Use CHECK_* in netwillchan@chromium.org2010-03-021-3/+3
| | | | | | Review URL: http://codereview.chromium.org/660404 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40453 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Expose storing metadata on a given entry.rvargas@google.com2010-03-025-20/+283
| | | | | | | | | | BUG=32406 TEST=unittests Review URL: http://codereview.chromium.org/660041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40400 0039d316-1c4b-4281-b951-d872f2087c98
* Remove connection failed histograms.vandebo@chromium.org2010-03-021-5/+3
| | | | | | | | | BUG=none - not used and blocks refactoring for bug 30357 TEST=unit tests Review URL: http://codereview.chromium.org/661318 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40397 0039d316-1c4b-4281-b951-d872f2087c98
* Work around 3rd party problem causing bug 27870.vandebo@chromium.org2010-02-272-9/+1
| | | | | | | | | | | | Check that we report that we wrote no more than we requested to write. Remove some debugging. BUG=27870 TEST=none Review URL: http://codereview.chromium.org/660194 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40197 0039d316-1c4b-4281-b951-d872f2087c98
* Make a proper TCPSocketParamsvandebo@chromium.org2010-02-271-21/+14
| | | | | | | | | BUG=none TEST=existing unit tests Review URL: http://codereview.chromium.org/661194 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40182 0039d316-1c4b-4281-b951-d872f2087c98
* Added HttpAuthFilter.cbentzel@chromium.org2010-02-2610-9/+646
| | | | | | | | | | | Original patch by ahendrickson@chromium.org (http://codereview.chromium.org/646068) BUG=29596 TEST=net_unittests.exe --gtest_filter="*HttpAuthFilterTest*" Review URL: http://codereview.chromium.org/660193 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40157 0039d316-1c4b-4281-b951-d872f2087c98
* Fix SpdySessionPool to take a host port pair instead of just the host.willchan@chromium.org2010-02-261-7/+8
| | | | | | | | BUG=28595 Review URL: http://codereview.chromium.org/660107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40077 0039d316-1c4b-4281-b951-d872f2087c98
* Added SSPILibrary interface so unit tests can mock SSPI calls.cbentzel@chromium.org2010-02-257-47/+386
| | | | | | | | | BUG=None TEST=net_unittests.exe --gtest_filter="*HttpAuthSSPI*" Review URL: http://codereview.chromium.org/650164 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40021 0039d316-1c4b-4281-b951-d872f2087c98
* Add ERR_END_OF_STREAMvandebo@google.com2010-02-244-19/+48
| | | | | | | | | | | | Add new error code "END_OF_STREAM" and use it in HttpStreamParser. Update a test to expect failure instead of success on an incomplete stream. BUG=25032 TEST=updated unittests Review URL: http://codereview.chromium.org/650190 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39822 0039d316-1c4b-4281-b951-d872f2087c98
* ProxyConfig behaved like a struct, but was defined as a class.eroman@chromium.org2010-02-241-1/+1
| | | | | | | | | Changed it to be a proper class with hidden implementation variables, setters etc. Also seized this opportunity to move the bypass list from being a member of ProxyConfig, to being a member of ProxyRules. This is a more correct hiearchy, since the bypass rules only apply to the manual settings. Lastly, this makes it possible to have the manual rules evaluation be a method on ProxyRules, and shift some more code out of proxy_service. Review URL: http://codereview.chromium.org/651070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39818 0039d316-1c4b-4281-b951-d872f2087c98
* Add APIs to expose http cache's metadata and thervargas@google.com2010-02-238-0/+65
| | | | | | | | | | | the ability to stop caching a given request. BUG=32406, 22900 TEST=none Review URL: http://codereview.chromium.org/600167 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39751 0039d316-1c4b-4281-b951-d872f2087c98
* Rename use_spdy_ to using_spdy_ and test it in more places:wtc@chromium.org2010-02-222-15/+16
| | | | | | | | | | | DoInitConnectionComplete and Read. R=willchan BUG=none TEST=none Review URL: http://codereview.chromium.org/652011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39673 0039d316-1c4b-4281-b951-d872f2087c98
* Validate that an SSPI scheme is supported before generating a handler.cbentzel@chromium.org2010-02-2210-53/+130
| | | | | | | | | | | | | | | | | When SSPI is used (for Windows builds), the NTLM and Negotiate handler factories determine the maximum token length the first time it is used. The SSPI call to determinine the maximum length also returns an error code if the scheme is unsupported. The factories remember if the scheme is unsupported and will not attempt to create any handlers. If the token length is found, it is remembered. If a different error occurs, don't create a handler this round, but try again in the future. BUG=None TEST=Manually used an incorrect auth scheme and validated that it worked. Working on a mock SSPI Library I can use for unit testing. Review URL: http://codereview.chromium.org/600129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39600 0039d316-1c4b-4281-b951-d872f2087c98
* Back out the change to HttpNetworkTransaction::Read in thewtc@chromium.org2010-02-201-2/+1
| | | | | | | | | | | previous checkin. It needs more work. TBR=willchan BUG=35108 TEST=none Review URL: http://codereview.chromium.org/650109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39541 0039d316-1c4b-4281-b951-d872f2087c98
* Make explicit the assumption that SpdySession::InitializeWithSocket takeswtc@chromium.org2010-02-201-1/+4
| | | | | | | | | | | an SSLClientSocket by renaming the methods and adding a DCHECK. R=willchan BUG=none TEST=No compilation errors. Review URL: http://codereview.chromium.org/650085 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39528 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a SPDY regression introduced in r39037. When we ignore certificatewtc@chromium.org2010-02-192-11/+24
| | | | | | | | | | | | | | | | errors for SPDY, we need to set |result| to OK. Add rudimentary support for restarting a SPDY network transaction after the user ignores a certificate error. This requires turning |use_spdy| into a class member. R=willchan BUG=35108 TEST=Testing SPDY with NPN against a server with a broken certificate should not result in an SSL certificate error page. Review URL: http://codereview.chromium.org/651054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39508 0039d316-1c4b-4281-b951-d872f2087c98
* Unit test for auth realms changing during requests.cbentzel@chromium.org2010-02-191-0/+142
| | | | | | | | | | | | | | | | | | | A series of exchanges such as C: GET / HTTP/1.1 S: 401, WWW-Authenticate: Basic realm=foo C: GET / HTTP/1.1, Authenticate: Basic <token> S: 401, WWWW-Authenticate: Basic realm=bar Should be treated as a rejection for the credentials presented for the foo realm. BUG=None TEST=net_unittests.exe --gtest_filter="*ChangeAuthTest*" Review URL: http://codereview.chromium.org/647034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39449 0039d316-1c4b-4281-b951-d872f2087c98
* Pulled out Callback code into base/callback.h. This is the first step ↵akalin@chromium.org2010-02-193-0/+4
| | | | | | | | | | | | | towards redoing the Callback interfaces. Added and removed includes as needed. BUG=35223 TEST=trybots Review URL: http://codereview.chromium.org/646061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39419 0039d316-1c4b-4281-b951-d872f2087c98
* Added factories for HttpAuthHandler.cbentzel@chromium.org2010-02-1532-253/+718
| | | | | | | | | | | | | | | | | | | The driving rationale for this change was to prevent choosing an AuthHandler when it is not supported on the system due to a missing runtime component (such as not being able to locate a gssapi shared library when seeing a Negotiate scheme). It also has the advantage (currently unused) of determining some per-auth-scheme properties only the first time that a challenge for that scheme is seen (such as maximum token length for the SSPI implementation of NTLM). Finally, it may make unit tests easier to generate since the factory can be easily mocked. BUG=34795 TEST=New unit test for HttpAuthHandlerDispatchFactory. Review URL: http://codereview.chromium.org/582007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39065 0039d316-1c4b-4281-b951-d872f2087c98
* Fix LOAD_IGNORE_CERT_* on Macukai@chromium.org2010-02-151-21/+23
| | | | | | | | | | | | | | SSLClientSocketMac reports certificate error before SSL handshake is completed, so just returning OK for LOAD_IGNORE_CERT_* won't work (completed_handshake_ is false yet, so we can't Read()/Write() on the socket). Add the cert in allowed_bad_certs, and reconnect again. BUG=35108 TEST=none Review URL: http://codereview.chromium.org/593013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39037 0039d316-1c4b-4281-b951-d872f2087c98
* More checks to try to find bug 27870.vandebo@google.com2010-02-122-1/+9
| | | | | | | | | BUG=27870 TEST=none Review URL: http://codereview.chromium.org/604022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38857 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Remove the explicit transaction callback and let thervargas@google.com2010-02-113-53/+54
| | | | | | | | | | | cache grab it when needed. BUG=26729 TEST=none. Review URL: http://codereview.chromium.org/594041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38848 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Eliminate EntryAvailable() and make the cache uservargas@google.com2010-02-113-28/+33
| | | | | | | | | | | | | callbacks to notify the transaction about the completion of AddTransactionToEntry. BUG=26729 TEST=current tests. Review URL: http://codereview.chromium.org/593058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38808 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Add a load log to the DoomEntry operation.rvargas@google.com2010-02-112-4/+22
| | | | | | | | | | BUG=26729 TEST=unittest Review URL: http://codereview.chromium.org/603011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38713 0039d316-1c4b-4281-b951-d872f2087c98
* Add option to suppress HTTP Referer header.jochen@chromium.org2010-02-101-1/+11
| | | | | | | | | BUG=none TEST=start chrome and run tcpdump -A. Should be contain any referer header. Review URL: http://codereview.chromium.org/600008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38587 0039d316-1c4b-4281-b951-d872f2087c98
* Http cache: Make sure that we don't send notificationsrvargas@google.com2010-02-102-9/+44
| | | | | | | | | | | from the cache transaction destructor. BUG=31723 TEST=unittests Review URL: http://codereview.chromium.org/594018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38554 0039d316-1c4b-4281-b951-d872f2087c98
* Include completion_callback.h instead of client_socket_handle.h.wtc@chromium.org2010-02-091-1/+1
| | | | | | | | | | | This header doesn't use anything from client_socket_handle.h. R=vandebo BUG=none TEST=No compilation errors. Review URL: http://codereview.chromium.org/579015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38492 0039d316-1c4b-4281-b951-d872f2087c98
* Add bounds checking to StaticSocketDataProvider, to make tests more reliablephajdan.jr@chromium.org2010-02-092-86/+156
| | | | | | | | | | | when they fail. TEST=net_unittests BUG=27567 Review URL: http://codereview.chromium.org/582020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38453 0039d316-1c4b-4281-b951-d872f2087c98
* The great Flip -> Spdy rename.mbelshe@chromium.org2010-02-088-53/+53
| | | | | | | | | BUG=30747 TEST=none Review URL: http://codereview.chromium.org/580009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38386 0039d316-1c4b-4281-b951-d872f2087c98
* Rename all files from flip* to spdy*.mbelshe@chromium.org2010-02-065-10/+10
| | | | | | | | | | | I haven't yet renamed the classes. BUG=30747 TEST=none Review URL: http://codereview.chromium.org/582001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38315 0039d316-1c4b-4281-b951-d872f2087c98
* Add Single Sign On support to HTTP Authentication handlers.cbentzel@chromium.org2010-02-0519-180/+438
| | | | | | | | | | | | | | | Currently this is implemented on Windows for the NTLM and Negotiate schemes. This CL does not introduce the hooks to actually use Single Sign On in response to a 401/407 request - that will come in a later CL. This behavior is disabled for now as well. BUG=29862 TEST=Ran unittests, and Chrome against a server with authentication challenges. Review URL: http://codereview.chromium.org/555174 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38227 0039d316-1c4b-4281-b951-d872f2087c98
* Add unittest for r37566 (on PAC failure, should fallback to DIRECT).eroman@chromium.org2010-02-052-42/+3
| | | | | | | | | | | | To make it more testable, I had to move the fallback code in question from HttpNetworkTransaction to ProxyService. Although I think this is a better fit for that code anway, so it should be an overall readability improvement. BUG=32316 TEST=ProxyServiceTest.ProxyFallback_BadConfig, ProxyServiceTest.ProxyResolverFails Review URL: http://codereview.chromium.org/556087 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38177 0039d316-1c4b-4281-b951-d872f2087c98
* Add specific error codes for when SOCKS connect fails.eroman@chromium.org2010-02-051-0/+11
| | | | | | | | | | | | | This also fixes HttpNetworkTransaction to fallback to the next proxy after a failure is encountered using a SOCKS proxy server. Note that I decided against using finer granularity error codes, since it just adds a higher maintenance cost to ReconsiderProxyAfterError(). Power users can get better information on the cause of the failure by looking at the LoadLog anyway. BUG=34386 Review URL: http://codereview.chromium.org/567030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38170 0039d316-1c4b-4281-b951-d872f2087c98
* Remove CRLF from http_auth_handler_negotiate_posix.cccbentzel@chromium.org2010-02-041-45/+45
| | | | | | | | | BUG=NONE TEST=Built Review URL: http://codereview.chromium.org/578005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38138 0039d316-1c4b-4281-b951-d872f2087c98
* Add a notion of 'eof' to UploadDataStream, replacing the use of its size ↵vandebo@google.com2010-02-042-3/+59
| | | | | | | | | | | | | | | property for detecting when an upload is finished. While this does prevent the crash described in the bug from occurring, this doesn't fully solve the problem as now the affected uploads don't complete. Fully resolving the issue will require implementing the chunked transfer encoding for requests. Patch from Vernon Tang <vt@foilhead.net>, original review: http://codereview.chromium.org/555194 BUG=33501 TEST=Create a file with a non-zero size and select that file in an HTML-based uploader. Before starting the upload, remove read permissions from that file. Check that the upload doesn't cause the browser to crash or hang. net_unittests: HttpNetworkTransactionTest.UploadFileSmallerThanLength, UploadDataStreamTest.* Review URL: http://codereview.chromium.org/578004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38129 0039d316-1c4b-4281-b951-d872f2087c98
* Add debug info to track a crash when sleeping.rvargas@google.com2010-02-041-0/+11
| | | | | | | | | BUG=31723 TEST=none Review URL: http://codereview.chromium.org/560039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38070 0039d316-1c4b-4281-b951-d872f2087c98
* Pass the NetworkChangeNotifier to HostResolver.willchan@chromium.org2010-02-048-22/+44
| | | | | | | | | | | | | | | This requires the following refactors: (1) NetworkChangeNotifier moves out of HttpNetworkSession into IOThread. (2) HostResolver gets initialized with NetworkChangeNotifier. (3) NetworkChangeNotifier needs to get passed into HttpCache and HttpNetworkSession (required updating a lot of files). (4) NetworkChangeNotifier is no longer reference counted. It is owned by IOThread. (5) IOThread gains a new struct: Globals. It can only be used on the io thread. (6) ChromeURLRequestContextFactory uses IOThread::Globals to initialize ChromeURLRequest objects with the host resolver and network change notifier. BUG=26159 Review URL: http://codereview.chromium.org/552117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38052 0039d316-1c4b-4281-b951-d872f2087c98
* Add mechanism for global queueing and prioritization of DNS.eroman@chromium.org2010-01-301-0/+3
| | | | | | | | | | | | | | Currently this limit is very high (50), but it can be tuned through a variable. BUG=9598 TEST= HostResolverImplTest.HigherPriorityRequestsStartedFirst HostResolverImplTest.CancelPendingRequest HostResolverImplTest.QueueOverflow Review URL: http://codereview.chromium.org/542086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37608 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a regression from r35549 that caused failure in evaluation of PAC script ↵eroman@chromium.org2010-01-292-7/+11
| | | | | | | | | | | | | | | | | | | to result in ERR_NO_SUPPORTED_PROXIES rather than falling back to DIRECT. BUG=32316 TEST= No unit-test yet. To test manually: (1) create a PAC script with contents: function FindProxyForURL(url, host) { throw "FAILURE!" } (2) Change the proxy settings to point at this file (can use a file:// URL if it is local). (3) Load http://www.google.com/. Should succeed. Without the bug fix, it would fail with ERR_NO_SUPPORTED_PROXIES. Review URL: http://codereview.chromium.org/549204 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37566 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup the unittest helpers in load_log_unittest.h.eroman@chromium.org2010-01-291-32/+32
| | | | | | | | | | | Consolidates all the callers to using the testing::AssertionResult() flavor, and renames them to have "Event" in the name. This rename is in anticipation of adding testers for other entry types. BUG=NONE TEST=existing Review URL: http://codereview.chromium.org/551135 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37501 0039d316-1c4b-4281-b951-d872f2087c98
* Use the USE_NSS macro to help porting to FreeBSD, OpenBSD, etc.wtc@chromium.org2010-01-281-3/+3
| | | | | | | | | | | Fix cpplint nits. R=evan,pvalchev BUG=none TEST=No compilation errors. Review URL: http://codereview.chromium.org/558008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37358 0039d316-1c4b-4281-b951-d872f2087c98
* Add a unit test which checks that Negotiate is chosen over NTLM.cbentzel@chromium.org2010-01-231-4/+23
| | | | | | | | | | | | Negotiate is chosen over NTLM on Windows, but currently is not on Linux or OSX since support has nat been added yet. BUG=32824 TEST=Added new unit test and ran it. Review URL: http://codereview.chromium.org/554043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36968 0039d316-1c4b-4281-b951-d872f2087c98