summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* Use HTTP status return code to make SDCH handling more robust.jar@chromium.org2009-03-3010-15/+222
| | | | | | | | | | | | | | | | | | | | | At least one proxy replaces the SDCH content with an error page (of HTML, without SDCH compression). We can identify that scenario by spotting the 40x HTTP return code (and the fact that the content is not SDCH encoded, even though we advertised SDCH and a dictionary to the server). This change list adds the ability to access the return code via the FilterContext. The bulk of the change is centered on getting that access method to be const in all derived classes. bug=8916 r=wtc,huanr,openvcdiff Review URL: http://codereview.chromium.org/56043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12784 0039d316-1c4b-4281-b951-d872f2087c98
* Add some includes needed by GCC 4.4.0mark@chromium.org2009-03-301-0/+1
| | | | | | | | | | | | base/string16.h uses EOF thus #include <stdio.h> net/disk_cache/trace.cc uses vsnprintf thus #include <stdio.h> Patch by Craig Schlenter <craig.schlenter@gmail.com> Review URL: http://codereview.chromium.org/46092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12777 0039d316-1c4b-4281-b951-d872f2087c98
* Facilitate SDCH content decoding after a proxy removes ALL content infojar@chromium.org2009-03-281-3/+6
| | | | | | | | | | | | | | | | Some proxies remove all content-encoding information when they see that SDCH encoding was done. We had a premature optimization that only called for doing "fixups" of content encoding IF there was some content encoding. We need to do the fixups as needed even if the HTTP headers didn't supply any encodings (such as when a proxy or anti-virus software strips all encodings!) bug=9151 r=huanr,kmixter,openvcdiff Review URL: http://codereview.chromium.org/56034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12731 0039d316-1c4b-4281-b951-d872f2087c98
* Increase allowable dictionary size so that iGoogle can test SDCHjar@chromium.org2009-03-271-1/+1
| | | | | | | r=huanr,openvcdiff Review URL: http://codereview.chromium.org/56023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12712 0039d316-1c4b-4281-b951-d872f2087c98
* Add a unit test for ProxyConfigServiceWin.ericroman@google.com2009-03-274-10/+195
| | | | | | Review URL: http://codereview.chromium.org/55001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12695 0039d316-1c4b-4281-b951-d872f2087c98
* Disk Cache: Second pass (and final) to allow multiple instancesrvargas@google.com2009-03-278-66/+149
| | | | | | | | | | | | | | | | | | | of BackendImpl. This cl takes care of all the histograms on the disk cache. Most of them have to be splitted in three so that we get separate data from different cache types. There are a few places where the complexity of splitting the histogram is not worth it so we just keep either all data together (if it makes sense), or just ignore data for some types of caches. note: Having multiple versions of a histogram but only one "active" for a given client is not the same as having multiple histograms working at the same time for different objects. Review URL: http://codereview.chromium.org/42682 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12692 0039d316-1c4b-4281-b951-d872f2087c98
* Fix leak in cert code that Valgrind found.avi@google.com2009-03-271-24/+33
| | | | | | | | http://crbug.com/9370 Review URL: http://codereview.chromium.org/42662 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12687 0039d316-1c4b-4281-b951-d872f2087c98
* After r12485, every POST request has an UploadData, even ifwtc@chromium.org2009-03-271-2/+3
| | | | | | | | | | | | | | | no data needs to be uploaded, so that we can set the identifier field in UploadData. So we should now enter the STATE_WRITE_BODY state only if request_body_stream_ has a nonzero size, so that we won't call connection_.socket()->Write() with zero bytes. R=darin BUG=9347 Review URL: http://codereview.chromium.org/42681 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12660 0039d316-1c4b-4281-b951-d872f2087c98
* filter_context.GetMimeType returns false if there is nowtc@chromium.org2009-03-271-1/+1
| | | | | | | | | | | Content-Type response header, so we should not assert that 'success' is always true. But we can assert that if 'success' is false, 'mime_type' is empty. R=jar Review URL: http://codereview.chromium.org/53127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12659 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent making real DNS lookups by chrome tests.phajdan.jr@chromium.org2009-03-275-13/+37
| | | | | | | | | | | | | | | | - by default a test which makes external DNS lookup directly or indirectly will fail - added a quite simple way to allow a test to make external queries - added a way to make external queries fail (for tests which don't need them to succeed but it's hard to not make the query) - made neccessary adjustments to existing tests so that they still pass http://crbug.com/9109 Review URL: http://codereview.chromium.org/45026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12653 0039d316-1c4b-4281-b951-d872f2087c98
* Respect cookies set in a 401 responses when restarting the http transaction.ericroman@google.com2009-03-2715-77/+296
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two parts to this change: (1) rebuild the request cookies before each transaction restart for authentication (2) notify the URLRequestHttpJob of header completion before *each* transaction restart for authentication By "each transaction" I mean the automatic restarts that don't require user input, such as: - replying to the first step of NTLM - selecting identity embedded in URL - selecting identity in auth-cache Needing to notify URLRequestHttpJob for these intermediate restarts is a consequence of cookie store management being done outside of HttpNetworkTransaction. After updating the cookie store, URLRequestHttpJob now tests |HttpTransaction::IsReadyToRestartForAuth()| to check whether the notification was informational or an identity is actually needed. R=wtc BUG=6450 Review URL: http://codereview.chromium.org/51004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12635 0039d316-1c4b-4281-b951-d872f2087c98
* Treat all 1xx the same as a 100 (continue).ericroman@google.com2009-03-272-2/+49
| | | | | | | | BUG=8440 Review URL: http://codereview.chromium.org/53111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12634 0039d316-1c4b-4281-b951-d872f2087c98
* URLRequestFileJob provides file handle if net::LOAD_ENABLE_DOWNLOAD_FILEhclam@chromium.org2009-03-262-0/+21
| | | | | | | | | | Make URLRequestFileJob to respect net::LOAD_ENABLE_DOWNLOAD_FILE load flag. It reopens the file specified by file:/// URL and saves the asynchronous file handle in HttpResponseInfo. Review URL: http://codereview.chromium.org/42657 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12605 0039d316-1c4b-4281-b951-d872f2087c98
* Removing vcprojs now generated by gyp.bradnelson@google.com2009-03-268-2465/+0
| | | | | | Review URL: http://codereview.chromium.org/42646 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12570 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Add a unit test that instantiates three cachesrvargas@google.com2009-03-263-7/+50
| | | | | | | | | at the same time (for media files). Review URL: http://codereview.chromium.org/45061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12561 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure last_time_seen_ is protected by the CookieMonster lock.deanm@chromium.org2009-03-261-2/+6
| | | | | | | Review URL: http://codereview.chromium.org/49019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12542 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure filters can handle an empty input bufferjar@chromium.org2009-03-252-4/+8
| | | | | | | | | | | | | | | The chaining of filters helped to guarantee that buffers were properly flushed when large expansions took place. That change assumed that a filter could be called with no input (as some filters need to be called repeatedly this way to purge massive internal state). The gzip and bzip filters were returning an error in that scenario. bug=9316 r=huanr Review URL: http://codereview.chromium.org/53074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12524 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a race in proxy_service_unittest.cc that was causing flakiness on purify ↵ericroman@google.com2009-03-251-35/+102
| | | | | | | | | | | | | build-bot. The issue is that the test helper "SyncProxyService" is deleting the underlying ProxyService from the main thread, it should instead be deleted from IO thread. Deleting from the main thread allows for a small window where deletion of ProxyService can begin while ProxyService::ProcessRequestsQueue() is still executing. BUG=8738 Review URL: http://codereview.chromium.org/42596 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12523 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: First pass to make it possible to havervargas@google.com2009-03-2517-71/+125
| | | | | | | | | | | | multiple instances of BackendImpl. We need multiple objects to be able to support media files on the cache. After this change, histograms will be the only thing that get messed up by multiple disk caches. Review URL: http://codereview.chromium.org/49027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12520 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: fix the report of first-eviction data to include onlyrvargas@google.com2009-03-251-1/+1
| | | | | | | | | | new users (so the file format has a valid create_time) Histograms from dev channel (171) are incorrect. Review URL: http://codereview.chromium.org/49032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12505 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 12479 which reverted 12470.willchan@chromium.org2009-03-2510-108/+199
| | | | | | | This change is the same as 12470, except with HttpRequestInfo::priority initialized in the initializer list, which should fix the purify errors. Review URL: http://codereview.chromium.org/53066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12490 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 12470.willchan@chromium.org2009-03-2510-198/+107
| | | | | | | caused purify errors Review URL: http://codereview.chromium.org/45055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12479 0039d316-1c4b-4281-b951-d872f2087c98
* Prioritize which HTTP requests get a socket first by adding a priority level ↵willchan@chromium.org2009-03-2510-107/+198
| | | | | | | | | | to various methods and classes. Fix lint errors along the way. R=darin,wtc BUG=8993 Review URL: http://codereview.chromium.org/42541 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12470 0039d316-1c4b-4281-b951-d872f2087c98
* Do not apply gzip filter to file names with gz/tgz/svgz extensions.thestig@chromium.org2009-03-251-0/+16
| | | | | | | | | This matches Firefox's behavior. BUG=8170 Review URL: http://codereview.chromium.org/42452 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12467 0039d316-1c4b-4281-b951-d872f2087c98
* GetMyHostName is renamed GetHostName to match the name ofwtc@chromium.org2009-03-255-10/+9
| | | | | | | | | the Unix/Winsock function gethostname. R=eroman Review URL: http://codereview.chromium.org/42590 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12466 0039d316-1c4b-4281-b951-d872f2087c98
* Add a new histogram macro to replace a few explicit calls.rvargas@google.com2009-03-242-19/+17
| | | | | | | | There is no real change in functionality. Review URL: http://codereview.chromium.org/42514 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12400 0039d316-1c4b-4281-b951-d872f2087c98
* * Switch the posix FileStream code over to using WorkerPool for asynchronous ↵willchan@chromium.org2009-03-242-69/+752
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | operations. * Add a bunch of tests for asynchronous operations. * Fix lint errors. Before: Summary iterations 5 pages 20 milliseconds 18585 mean per set 3717.00 mean per page 185.85 timer lag 2663.00 timer lag per page 26.63 After: Summary iterations 5 pages 20 milliseconds 9279 mean per set 1855.80 mean per page 92.79 timer lag 689.00 timer lag per page 6.89 Review URL: http://codereview.chromium.org/48111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12398 0039d316-1c4b-4281-b951-d872f2087c98
* Use #pragma pack as documented to work with GCC and MSVCmark@chromium.org2009-03-241-2/+2
| | | | | | Review URL: http://codereview.chromium.org/49017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12384 0039d316-1c4b-4281-b951-d872f2087c98
* Net module changes to support caching responses to a POST request.darin@chromium.org2009-03-245-48/+120
| | | | | | | | | | | The solution is to add a user-defined identifier to UploadData. If that identifier is set, and if the request method is POST, then HttpCache will enable caching for the response. (The cache key will be a composition of the identifier and the URL.) A subsequent POST request to the same URL with the same identifier will "hit" the previously generated cache entry. Reuse from the cache is subject to all of the standard rules. BUG=2636 R=wtc Review URL: http://codereview.chromium.org/52028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12374 0039d316-1c4b-4281-b951-d872f2087c98
* Computer total latency for DNS experimentjar@chromium.org2009-03-232-0/+11
| | | | | | | r=wtc Review URL: http://codereview.chromium.org/42518 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12296 0039d316-1c4b-4281-b951-d872f2087c98
* Make GetHostNameProc return a std::string.wtc@chromium.org2009-03-233-123/+113
| | | | | | | | | | | | | | | | | | | | Add the ScopedProcSetter helper class so that unit tests restore the original GenerateRandom and GetHostName functions on completion. Merge NTLMAuthModule into HttpAuthHandlerNTLM. The data members domain_, username_, and password_ are moved. The Init method is inlined at its only call site. The GetNextToken method is moved. Make generate_random_proc_ and get_host_name_proc_ static members of the HttpAuthHandlerNTLM class. R=eroman BUG=6567,6824 Review URL: http://codereview.chromium.org/43113 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12290 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce valgrind bot time from 12 minutes to 9 minutes by skipping one testdkegel@google.com2009-03-231-0/+3
| | | | | | Review URL: http://codereview.chromium.org/52011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12279 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt to detect impact of disabling dns prefetching on transaction latencyjar@chromium.org2009-03-231-1/+8
| | | | | | | | | This is also meant to exercise the field trial infrastructure. r=mbelshe Review URL: http://codereview.chromium.org/50084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12271 0039d316-1c4b-4281-b951-d872f2087c98
* Fully reset HttpNetworkTransaction::response_ when restarting the ↵ericroman@google.com2009-03-218-11/+98
| | | | | | | | | | | | | transaction. The reset is done using the default constructor. This is less fragile than resetting each member manually, and in fact not all members were being reset (for example, vary_data and ssl_info). In the case of vary_data this could cause a subtle glitch, since calling HttpVaryData::Init() twice on the same object doesn't fully re-initialize. The changes outside of http_network_transaction.cc are just a safety net -- it seemed reasonable to make HttpVaryData::Init() support the multiple-init model. Review URL: http://codereview.chromium.org/50031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12243 0039d316-1c4b-4281-b951-d872f2087c98
* Implement SSL renegotiation.wtc@chromium.org2009-03-202-77/+122
| | | | | | | | | | | | | | | | | | | | | | | | In the Windows Schannel API, a server requests renegotiation when DecryptMessage (decrypting received data) returns SEC_I_RENEGOTIATE. We need to jump to the handshake sequence, and when handshake completes, come back to reading data. I also cleaned up the code. I created the SetNextStateForRead and FreeSendBuffer functions to share common code, and made sure our handshake sequence is completely equivalent to the handshake sequence in the Platform SDK WebClient.c sample. R=rvargas BUG=6893 TEST=Visit these sites, which request SSL renegotiation: https://secure.skandiabanken.se/Skbsecure/LoginInternet/SKBLoginInternet.aspx https://secure.skandiabanken.no/SkbSecure/Authentication/Otp/Default.ashx https://www.myopenid.com/signin_certificate Review URL: http://codereview.chromium.org/42380 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12229 0039d316-1c4b-4281-b951-d872f2087c98
* Update the gyp Linux build:sgk@google.com2009-03-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | * Add Linux settings to target_defaults in common.gypi so gyp-generated SConscript files no longer depend on build/SConscript.main or the Hammer infrastructure. * Copy the FilterOut() function from Hammer to the chromium_builders.py Tool module. * Add a ChromiumLoadableModule() builder to chromium_builders.py. * Add dependencies on the 'views' library to the chrome link (target 'app'). * Add missing views/*/*_unittest.cc modules to the 'unit_tests' target. Exclude all but the one that builds on Linux from the non-Windows builds. * Crib a list of chrome/views files to exclude from the Linux build from the old SCons configuration. * Add a new build/linux/system.gyp file with new 'settings' targets to encapsulate the pkg-config checks for gtk+-2.0, nss and pangoft2. * Add depenedencies in the other targets on the new gtk, nss and pangoft2 'settings' targets from build/linux/system.gyp. * Add a pkg_config_wrapper.py script that keeps gyp happy by simply exiting 0 if the package isn't found. * DEPS roll for latest gyp changes to support the above. Review URL: http://codereview.chromium.org/42340 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12228 0039d316-1c4b-4281-b951-d872f2087c98
* Don't expect unit tests to free root certdkegel@google.com2009-03-201-0/+4
| | | | | | Review URL: http://codereview.chromium.org/42425 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12223 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: More instrumentation for the cache.rvargas@google.com2009-03-206-15/+192
| | | | | | | | | | | | | | Now we separate data between before and after the cache is full. Also, reduce the rate at which a particular client sends data to be only once a week. The effect is that the histogram data will only have one value per client, and the same client will not be "voting" on more than one version (release) at the same time. Review URL: http://codereview.chromium.org/50063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12218 0039d316-1c4b-4281-b951-d872f2087c98
* CFNetworkExecuteProxyAutoConfigurationURL() chokes if the query url is NULL, ↵pinkerton@chromium.org2009-03-201-2/+6
| | | | | | | | and CFURL loves to be NULL when it can't parse something. Fixes a crash loading a horrific looking URL on espn.com Review URL: http://codereview.chromium.org/50064 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12205 0039d316-1c4b-4281-b951-d872f2087c98
* initialize mixed_ in the File(PlatformFile) constructor variant.ericroman@google.com2009-03-202-2/+2
| | | | | | Review URL: http://codereview.chromium.org/42419 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12193 0039d316-1c4b-4281-b951-d872f2087c98
* don't UMR if GetFileSize() fails.ericroman@google.com2009-03-201-2/+2
| | | | | | Review URL: http://codereview.chromium.org/42417 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12191 0039d316-1c4b-4281-b951-d872f2087c98
* Add #include <fcntl.h>patrick@chromium.org2009-03-201-0/+2
| | | | | | Review URL: http://codereview.chromium.org/50060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12190 0039d316-1c4b-4281-b951-d872f2087c98
* Add the directory listing code for the new portable FTPwtc@chromium.org2009-03-195-0/+1551
| | | | | | | | | | | | | implementation, based on the Mozilla code mozilla/netwerk/streamconv/converters/ParseFTPList.cpp. Contributed by Ibrar Ahmed <ibrar.ahmad@gmail.com>. R=darin,wtc BUG=4965 Review URL: http://codereview.chromium.org/42261 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12171 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for progressive JPEGs with MIME type image/pjpeg. Fixes Issue 2104.jon@chromium.org2009-03-191-0/+1
| | | | | | Review URL: http://codereview.chromium.org/42424 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12168 0039d316-1c4b-4281-b951-d872f2087c98
* Add a unit test for X509Certificate::Policy.abarth@chromium.org2009-03-191-0/+36
| | | | | | | | TBR=wtc Review URL: http://codereview.chromium.org/50002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12086 0039d316-1c4b-4281-b951-d872f2087c98
* Net unittests: handle the case where recv failsagl@chromium.org2009-03-191-1/+9
| | | | | | | | | (found by Coverity) Review URL: http://codereview.chromium.org/48164 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12076 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Store the stats only once every five minutes.rvargas@google.com2009-03-191-1/+1
| | | | | | Review URL: http://codereview.chromium.org/48171 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12070 0039d316-1c4b-4281-b951-d872f2087c98
* Try to get inter-packet times more preciselyjar@chromium.org2009-03-192-21/+48
| | | | | | | | | | | | | | | | | | I had tried to rely on the call to ReadData() being made once per TCP/IP packet, but histograms from the field show that does not work well :-(. This version looks for boundary counts of multiples of 1430 bytes, and uses that as a better approximation of when a packet is received. For test data with only a few packets, this is excellent. Some vendors such as Google tend to use at most 1430 bytes per packet, so even if we are off a bit, it will be close (for small packet counts). Alos, add histogram for total transmitted data (compressed via sdch and gzip) r=huanr,ajenjo Review URL: http://codereview.chromium.org/48077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12069 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Instead of saving the cache stats only whenrvargas@google.com2009-03-183-11/+22
| | | | | | | | | | | | the destructor is called, store them each five minutes. From the dev channel, 15% of the runs the disk cache destructor is not called, so the stats are not that reliable without this change. Review URL: http://codereview.chromium.org/42373 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12043 0039d316-1c4b-4281-b951-d872f2087c98
* Document how we avoid running leaky tests under Purify and Valgrind,dkegel@google.com2009-03-183-0/+20
| | | | | | | | and copy Purify's list of leaky net tests for Valgrind's benefit. Review URL: http://codereview.chromium.org/42309 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12042 0039d316-1c4b-4281-b951-d872f2087c98