summaryrefslogtreecommitdiffstats
path: root/net/http
Commit message (Collapse)AuthorAgeFilesLines
* * Cleanup: move base/platform_test.h -> testing/jeremy@chromium.org2008-12-022-2/+2
| | | | | | | | * Add support for "Debug On Start" switch to MultiprocessTest::SpawnChild Review URL: http://codereview.chromium.org/13052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6227 0039d316-1c4b-4281-b951-d872f2087c98
* Minor refactorings:ericroman@google.com2008-12-024-6/+5
| | | | | | | | | | | | - Change scheme from a (const char*) to a (std::string). This is in response to an earlier comment. Background: It used to be a (const char*) to avoid allocating a string object since all the callers initialize it with a string literal. - Change the initial value of nonce_count_ from 1 to 0. This doesn't functionally change anything (we just change to a pre-increment rather than post-increment), but I prefer the the start-at-zero style. Review URL: http://codereview.chromium.org/12846 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6208 0039d316-1c4b-4281-b951-d872f2087c98
* http_cache: Don't destroy an entry from the transaction destructor ifrvargas@google.com2008-11-242-7/+23
| | | | | | | | | | | | | | | | | | there is a task posted to process the next transaction. Also, fix the check to determine the type of transaction to consider writers that were converted to readers by the time the destructor runs. I'm adding more checks to see if these were all the problems related to bug 3931. B=4731 R=darin Review URL: http://codereview.chromium.org/12608 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5938 0039d316-1c4b-4281-b951-d872f2087c98
* Add run time checks to get more info for bug 3931.rvargas@google.com2008-11-221-8/+26
| | | | | | | | | | | The idea is just crash a little earlier and hopefully see if we can detect memory corruption as the cause of the actual bug. Review URL: http://codereview.chromium.org/11583 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5877 0039d316-1c4b-4281-b951-d872f2087c98
* Add a flags to further control response header persistence. We use this todarin@chromium.org2008-11-204-59/+148
| | | | | | | | | | | | | | | | | filter out Set-Cookie and Set-Cookie2 response headers from being forwarded to the renderer. This serves to prevent the renderer from having any access to HttpOnly cookies, and it also prevents XMLHttpRequest consumers from being able to read cookies in the HTTP response headers. This is consistent with changes made to Firefox and WebKit. Patch by marius.schilder@gmail.com R=deanm,darin Review URL: http://codereview.chromium.org/11264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5767 0039d316-1c4b-4281-b951-d872f2087c98
* Punt the proxy errors into a bug.evanm@google.com2008-11-181-1/+5
| | | | | | | | | | This cuts down on error spew for test_shell, which lets us make progress on layout tests. Review URL: http://codereview.chromium.org/11220 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5594 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the duplicate session_callback_->AddRef() calls made bywtc@google.com2008-11-142-43/+56
| | | | | | | | | | | | | | | | | | the Restart() calls in DidReceiveError() and the RestartWithAuth() call in DidReceiveHeaders() by adding a new RestartInternal() method that doesn't call session_callback_->AddRef(). Remove the username/password that the server rejected from the auth cache only if the cache entry has the same username/password. Use the username:password specified in the URL after receiving a 401 response from the server. Do not send it preemptively. R=eroman BUG=b/1473850 Review URL: http://codereview.chromium.org/10668 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5421 0039d316-1c4b-4281-b951-d872f2087c98
* A minor tweak of r5245. I'm more confident that WinHTTPwtc@google.com2008-11-141-1/+1
| | | | | | | | | | | | | | | | knows a transaction is complete when WinHttpReadData returns a zero byte count. So it's safer to NOT notify the request throttle when WinHttpReadData returns a nonzero byte count, even if we have read the number of bytes specified in the Content-Length response header. I verified that this is still enough to fix the bug (unresponsiveness). R=darin BUG=4302 Review URL: http://codereview.chromium.org/10867 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5415 0039d316-1c4b-4281-b951-d872f2087c98
* Add more info to the comment about www.yahoo.com's padding ofwtc@google.com2008-11-143-8/+13
| | | | | | | | | | | | | | | | the chunk-size field. Fix miscellaneous nits reported by cpplint.py. Use ASCIItoWide instead of UTF8ToWide to convert the username and password specified in a URL. Those two components of the URL have to be ASCII. Carry over a TODO comment about unescaping username/password from http_transaction_winhttp.cc. R=eroman Review URL: http://codereview.chromium.org/10864 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5410 0039d316-1c4b-4281-b951-d872f2087c98
* Notify the WinHttpRequestThrottle of the completion of awtc@google.com2008-11-122-2/+11
| | | | | | | | | | | | | | | | | | | request when we have read the entire response, rather than waiting until the destructor. This is what we do in the new HTTP stack (see HttpNetworkTransaction::DoReadBodyComplete). This allows us to unblock the queued requests in the WinHttpRequestThrottle sooner. After this change, the name of the request_submitted_ member is no longer accurate. Since we'll replace the WinHTTP code soon, I just update the comment rather than renaming the member. R=darin BUG=4302 Review URL: http://codereview.chromium.org/10613 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5245 0039d316-1c4b-4281-b951-d872f2087c98
* Add unittests for eviction of http auth cache entries.ericroman@google.com2008-11-113-8/+106
| | | | | | Review URL: http://codereview.chromium.org/9734 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5161 0039d316-1c4b-4281-b951-d872f2087c98
* - Add preemptive authorization (new http stack only)ericroman@google.com2008-11-0823-164/+1375
| | | | | | | | | | | | - Check for auth identity in URL (new http stack only) - Move auth cache logic out of url request job, and hide it in the url request ftp job and http transaction classes. Note: Somehow the original codereview thread got corrupted so it was recreated. The real review comments should be under (http://codereview.chromium.org/6481) Review URL: http://codereview.chromium.org/8231 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5064 0039d316-1c4b-4281-b951-d872f2087c98
* Adaptively identify URL subresources and pre-resolve hosts via DNSjar@google.com2008-11-062-2/+5
| | | | | | | | | | | | | | | | | | | | Use the HTTP "referer" header to identify subresources used during a page load. Store that info, and use it when next visiting the referenced hosts to pre-resolve the (probably) needed subresources. This set of changes will surely evolve as we see how it plays out on broader distribution (via histogram measurments), but this should be the foundation of the change. In design specs, this was previously referred to as "adaptive correlated DNS prefetching." r=mbelshe Review URL: http://codereview.chromium.org/9168 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4929 0039d316-1c4b-4281-b951-d872f2087c98
* Add histogram to show network latency (first byte to last byte)jar@google.com2008-11-062-0/+16
| | | | | | | | | Also added a histogram to show effective bandwidth of the download. r=darin,wtc Review URL: http://codereview.chromium.org/9625 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4898 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the UploadDataStream::Reset method. Instead,wtc@google.com2008-11-052-6/+101
| | | | | | | | | | | | | | | | rewind an UploadDataStream by recreating the object. Fix a bug in MockTCPClientSocket::Write. It needs to increment write_index_. Add two DCHECKs to simulate the DCHECKS in SSLClientSocketWin::DoPayloadEncrypt. Add a unit test. R=darin,eroman BUG=4062 Review URL: http://codereview.chromium.org/9384 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4819 0039d316-1c4b-4281-b951-d872f2087c98
* Wrap forward declarations in their relevant namespaceagl@chromium.org2008-11-051-0/+1
| | | | | | | | | | Forward declarations can't simply use "class $namespace::$class;" syntax. Instead one needs to use "namespace $namespace { class $class; }" syntax. Review URL: http://codereview.chromium.org/8722 Patch from James Vega. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4723 0039d316-1c4b-4281-b951-d872f2087c98
* Add a unit-test for r4624 (tcpclientsocket recycling on CONNECT).ericroman@google.com2008-11-052-3/+73
| | | | | | | | Also corrects a style problem in r4624 (comment order does not match expression order). Review URL: http://codereview.chromium.org/9369 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4714 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent recycling TCPClientSocket in the case of https, so as not to crash.ericroman@google.com2008-11-041-2/+2
| | | | | | | | | | The situation this protects against is better explained in comment 13: http://code.google.com/p/chromium/issues/detail?id=3772#c13 Review URL: http://codereview.chromium.org/9088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4624 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the debugging instrumentation.ericroman@google.com2008-11-042-62/+0
| | | | | | Review URL: http://codereview.chromium.org/9304 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4623 0039d316-1c4b-4281-b951-d872f2087c98
* More instrumentation.ericroman@google.com2008-11-032-25/+64
| | | | | | Review URL: http://codereview.chromium.org/9064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4520 0039d316-1c4b-4281-b951-d872f2087c98
* More no-op instrumentation code for bug 3772.ericroman@google.com2008-11-012-49/+23
| | | | | | | | TBR=wtc Review URL: http://codereview.chromium.org/9201 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4356 0039d316-1c4b-4281-b951-d872f2087c98
* Add some debugging instrumentation for 3772. This replaces the previous ↵ericroman@google.com2008-10-312-30/+49
| | | | | | | | instrumentation. Goal is to push preserve some member variables in the mini-dump, and to check if |this| is a valid pointer. Review URL: http://codereview.chromium.org/8211 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4298 0039d316-1c4b-4281-b951-d872f2087c98
* Relanding of r4221, initial proxy support for the Macavi@google.com2008-10-311-0/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4293 0039d316-1c4b-4281-b951-d872f2087c98
* oops; will reland once tree is openavi@google.com2008-10-301-4/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4223 0039d316-1c4b-4281-b951-d872f2087c98
* Initial Mac proxy implementationavi@google.com2008-10-301-0/+4
| | | | | | Review URL: http://codereview.chromium.org/8671 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4221 0039d316-1c4b-4281-b951-d872f2087c98
* Temporary code instrumentation to gather info on a crash.ericroman@google.com2008-10-292-3/+32
| | | | | | | | | | | | The idea is to see where in DidReadResponseHeaders() things blow up (if at all). This hack adds a value at ebp+8 (parent's frame) which indicates where we were. TBR=wtc Review URL: http://codereview.chromium.org/8890 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4174 0039d316-1c4b-4281-b951-d872f2087c98
* An experimental change to help us diagnose a crashwtc@google.com2008-10-291-0/+1
| | | | | | | | | | | | | | in DoReadHeadersComplete. Add an unused state, STATE_UNUSED, at the old value of STATE_READ_HEADERS_COMPLETE (15 = 0xF) to see if that value has any significance in the crash. TBR=eroman BUG=3772 Review URL: http://codereview.chromium.org/8701 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4133 0039d316-1c4b-4281-b951-d872f2087c98
* Pass a user agent string to WinHttpOpen to set the userwtc@google.com2008-10-291-60/+61
| | | | | | | | | | | | | | | | | | | agent string on the session handle, which is the only way to specify the User-Agent header for HTTP CONNECT requests. This requires some refactoring. Most of the work done by Session::Init() is moved to the Session constructor. Session::Init() now only creates the primary session handle, and the call to Session::Init() is delayed to the first time we use the primary session handle (session_->internet()). R=darin BUG=552 Review URL: http://codereview.chromium.org/8841 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4114 0039d316-1c4b-4281-b951-d872f2087c98
* Add some extra unit-tests to make sure we cover all permutations of ↵ericroman@google.com2008-10-292-0/+44
| | | | | | | | {basic_auth, digest_auth} x {empty_username, empty_password}. Review URL: http://codereview.chromium.org/8863 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4113 0039d316-1c4b-4281-b951-d872f2087c98
* Add an HTTP basic auth unit test for an empty username.wtc@google.com2008-10-281-0/+2
| | | | | | | | R=eroman BUG=297 Review URL: http://codereview.chromium.org/8859 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4109 0039d316-1c4b-4281-b951-d872f2087c98
* Move Time, TimeDelta and TimeTicks into namespace base.dsh@google.com2008-10-279-18/+32
| | | | | | Review URL: http://codereview.chromium.org/7995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4022 0039d316-1c4b-4281-b951-d872f2087c98
* Call DidStartDnsResolution and DidFinishDnsResolutionWithStatuswtc@google.com2008-10-241-1/+5
| | | | | | | | | in the new HTTP stack. R=jar Review URL: http://codereview.chromium.org/8155 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3933 0039d316-1c4b-4281-b951-d872f2087c98
* Port:mark@chromium.org2008-10-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | - net/base/dns_resolution_observer.cc - net/http/http_network_transaction.cc - net/url_request/url_request_filter.cc Add to net library the above and: - net/base/dns_resolution_observer.cc - net/base/upload_data_stream.cc - net/http/http_network_layer.cc - net/proxy/proxy_resolver_fixed.cc - net/proxy/proxy_service.cc - net/url_request/url_request_job_manager.cc Add to net_unittests: - net/http/http_network_transaction_unittest.cc - net/http/http_transaction_unittest.cc - net/http/http_util_unittest.cc Patch by Paweł Hajdan jr <phajdan.jr@gmail.com> git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3867 0039d316-1c4b-4281-b951-d872f2087c98
* Fix array out of bounds in unit test.ericroman@google.com2008-10-231-10/+8
| | | | | | | | I was passing a non-null-terminated string to a caller that expected null-terminated string. Review URL: http://codereview.chromium.org/7934 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3845 0039d316-1c4b-4281-b951-d872f2087c98
* Bound the maximum buffer size for response headers.ericroman@google.com2008-10-233-0/+70
| | | | | | | | http://code.google.com/p/chromium/issues/detail?id=3654 Review URL: http://codereview.chromium.org/7882 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3827 0039d316-1c4b-4281-b951-d872f2087c98
* Defer the HttpNetworkSession initialization to first time CreateTransaction ↵ericroman@google.com2008-10-222-6/+13
| | | | | | | | | | is called. http://code.google.com/p/chromium/issues/detail?id=3639 Review URL: http://codereview.chromium.org/7854 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3767 0039d316-1c4b-4281-b951-d872f2087c98
* Remove HttpTransaction::Destroy(), and do automatic memory management with ↵ericroman@google.com2008-10-2111-154/+107
| | | | | | | | scoped_ptr<>. Review URL: http://codereview.chromium.org/7532 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3701 0039d316-1c4b-4281-b951-d872f2087c98
* We don't support SSL renegotiation yet. Add thewtc@google.com2008-10-212-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ERR_SSL_RENEGOTIATION_REQUESTED error code for when we received a renegotiation request from a server. Support the completion of an SSL handshake after we write something. (This happens in a session resumption handshake.) Use the SSL configuration settings to turn on or turn off various versions of the SSL protocol and server certificate revocation checking. Report all the errors of a certificate and whether revocation checking was done in in the server_cert_status_ bitmask. Create a new scoped_cert_chain_context.h header for the ScopedCertChainContext class that used to be in x509_certificate_win.cc, and use it to fix a leak of chain_context on error paths in SSLClientSocketWin::VerifyServerCert. R=rvargas BUG=3002,3003,3004 Review URL: http://codereview.chromium.org/7505 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3664 0039d316-1c4b-4281-b951-d872f2087c98
* Misc cleanupsericroman@google.com2008-10-172-18/+13
| | | | | | | | | - leak in unittest - remove a platform ifdef Review URL: http://codereview.chromium.org/7500 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3573 0039d316-1c4b-4281-b951-d872f2087c98
* Misc style changes.ericroman@google.com2008-10-163-30/+15
| | | | | | | | (trying to address previous review comments). Review URL: http://codereview.chromium.org/7447 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3482 0039d316-1c4b-4281-b951-d872f2087c98
* Make zero-byte responses an error, rather than an empty HTTP/0.9 case.ericroman@google.com2008-10-163-17/+49
| | | | | | Review URL: http://codereview.chromium.org/7381 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3446 0039d316-1c4b-4281-b951-d872f2087c98
* Turn SSLClientSocket into an interface.wtc@google.com2008-10-153-27/+15
| | | | | | | | | | | | | | | | | | | | The original ssl_client_socket.{h,cc} are renamed ssl_client_socket_win.{h,cc}. The new ssl_client_socket.h defines the SSLClientSocket interface, which simply extends the ClientSocket interface with a new GetSSLInfo method. ClientSocketFactory::CreateSSLClientSocket returns SSLClientSocket* instead of ClientSocket*. Replace the SSL protocol version mask parameter to the constructor and factory method by a SSLConfig parameter. R=darin Review URL: http://codereview.chromium.org/7304 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3387 0039d316-1c4b-4281-b951-d872f2087c98
* The Schannel considers some cipher suites (e.g., thewtc@google.com2008-10-132-13/+24
| | | | | | | | | | | | | | AES cipher suites) to be TLS only, and won't allow them to be used in SSL 3.0. If an SSL 3.0 server picks such a cipher suite, we need to handle it as if it were TLS intolerant by turning off TLS and retrying. R=darin BUG=3203,3001 Review URL: http://codereview.chromium.org/7242 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3295 0039d316-1c4b-4281-b951-d872f2087c98
* - Add auth integration tests to http_network_transaction_unitttest.ccericroman@google.com2008-10-082-14/+272
| | | | | | | | - Add unique error code for when origin server returns 407. Review URL: http://codereview.chromium.org/4334 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3067 0039d316-1c4b-4281-b951-d872f2087c98
* Unrollback 3024 (partially rolled back in 3027).ericroman@google.com2008-10-082-15/+7
| | | | | | | | It is fixed in mac build now -- problem was bad format string to StringPrintf, where passed string instead of char*. Review URL: http://codereview.chromium.org/6359 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3064 0039d316-1c4b-4281-b951-d872f2087c98
* Update a comment based on our findings today.pkasting@chromium.org2008-10-081-4/+4
| | | | | | Review URL: http://codereview.chromium.org/6463 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3059 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 3024, broke mac build.maruel@google.com2008-10-082-7/+15
| | | | | | Review URL: http://codereview.chromium.org/6351 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3027 0039d316-1c4b-4281-b951-d872f2087c98
* Pull in new googleurl@94 which includes GURL::EffectiveIntPort().ericroman@google.com2008-10-082-15/+7
| | | | | | | | Update callers to use this method. Review URL: http://codereview.chromium.org/5641 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3024 0039d316-1c4b-4281-b951-d872f2087c98
* Use the new HTTP stack by default in the net module'swtc@google.com2008-10-081-1/+1
| | | | | | | | | | | | | | | | tests, but continue to use WinHTTP by default in the test shell and chrome. The mapping of CRYPT_E_NO_REVOCATION_CHECK to ERR_CERT_NO_REVOCATION_MECHANISM (a certificate error code) is necessary to make the HTTPSTestServer's start and shutdown GET commands work. (The TestDelegate ignores all certificate errors.) R=darin Review URL: http://codereview.chromium.org/6472 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3022 0039d316-1c4b-4281-b951-d872f2087c98
* Handle TLS-intolerant servers by retrying with TLS 1.0wtc@google.com2008-10-083-4/+39
| | | | | | | | | | turned off. R=darin BUG=3001 Review URL: http://codereview.chromium.org/5617 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3017 0039d316-1c4b-4281-b951-d872f2087c98