summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* NULL out the ProxyScriptFetcher used by ProxyService when the ↵eroman@chromium.org2009-11-187-10/+123
| | | | | | | | | | | | URLRequestContext it was using for downloads is destroyed. This avoids the possibility of accessing freed memory when sharing ProxyService amongst request context, and the main context is destroyed first. BUG=25338 Review URL: http://codereview.chromium.org/387065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32427 0039d316-1c4b-4281-b951-d872f2087c98
* Display application/json files inline.thestig@chromium.org2009-11-181-0/+1
| | | | | | | | BUG=27884 TEST=see bug. Review URL: http://codereview.chromium.org/385148 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32375 0039d316-1c4b-4281-b951-d872f2087c98
* Don't call CancelURLRequest if request_is already NULL.ukai@chromium.org2009-11-181-8/+8
| | | | | | | | | | | | | | | | Fix DCHECK when io_loop_ is NULL http://code.google.com/p/chromium/issues/detail?id=23437#c8 hits DCHECK at nss_ocsp.cc:281 in CancelURLRequest(). CancelURLRequest() is called from Cancel() if io_loop_ is not NULL. Maybe, we don't need to call CancelURLRequest if request_ is already NULL, which happens when request is completed in OnReadCompleted(). BUG=23437 TEST=none Review URL: http://codereview.chromium.org/405013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32306 0039d316-1c4b-4281-b951-d872f2087c98
* Add histograms for data connection error types.phajdan.jr@chromium.org2009-11-172-0/+80
| | | | | | | | | | | | The plan is to see how many of them are possibly caused by the passive FTP mode being blocked in the network. TEST=none BUG=3073 Review URL: http://codereview.chromium.org/389023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32175 0039d316-1c4b-4281-b951-d872f2087c98
* Try to fix valgrind error in nss_ocsp.ccukai@chromium.org2009-11-171-11/+36
| | | | | | | | | | | | | | I think valgrind error would happen when IO thread was terminated before cert verification timed out. So, observe IO thread destruction and once IO thread destructed, don't post task to cancel the cert verication. BUG=23437 TEST=none Review URL: http://codereview.chromium.org/390011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32150 0039d316-1c4b-4281-b951-d872f2087c98
* Build fix: don't check deps in net/third_party.agl@chromium.org2009-11-171-0/+4
| | | | | | | | This mirrors the entry for the top-level third_party. Over the shoulder review by tc. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32138 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: enable building with a local version of libssl.agl@chromium.org2009-11-1754-0/+35142
| | | | | | http://codereview.chromium.org/394003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32135 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: fix uninit warnings when building -Os.agl@chromium.org2009-11-161-1/+1
| | | | | | http://codereview.chromium.org/401002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32105 0039d316-1c4b-4281-b951-d872f2087c98
* Move NULLing of OCSP context from UI thread to IO thread, to avoid possible ↵eroman@chromium.org2009-11-162-4/+9
| | | | | | | | races. Review URL: http://codereview.chromium.org/391062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32104 0039d316-1c4b-4281-b951-d872f2087c98
* Add a test for verifying that SYN_REPLY headers are properlymbelshe@google.com2009-11-161-0/+148
| | | | | | | | | | | | converted back into the HTTP headers used by the upper layers of the HttpNetworkTransaction stack. BUG=none TEST=flip_network_transaction_unittest.cc Review URL: http://codereview.chromium.org/384145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32099 0039d316-1c4b-4281-b951-d872f2087c98
* Try https proxy for websocket connection.ukai@chromium.org2009-11-162-1/+18
| | | | | | | | | | | | | | | Safari always uses "https" to get proxies for websocket connection, so chrome also tries it as well. Fix url replacement failure. We should use std::string instead of char[]. BUG=none TEST=net_unittests passes Review URL: http://codereview.chromium.org/397008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32050 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 32045.ukai@chromium.org2009-11-162-17/+1
| | | | | | Review URL: http://codereview.chromium.org/396009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32049 0039d316-1c4b-4281-b951-d872f2087c98
* Try https proxy for websocket connection.ukai@chromium.org2009-11-162-1/+17
| | | | | | | | | | | | Safari always uses "https" to get proxies for websocket connection, so chrome also tries it as well. BUG=none TEST=none Review URL: http://codereview.chromium.org/398004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32045 0039d316-1c4b-4281-b951-d872f2087c98
* Add modp_b64 dependency to net_base. This is used by net/base/Base64.cc.maruel@chromium.org2009-11-161-0/+1
| | | | | | | | | | BUG=NONE TEST=Built a binary on Linux which was failing before. Have not tried building on Windows or Mac yet - will have those machines set up next week. Review URL: http://codereview.chromium.org/385116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32038 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bad last checkin which broke everything in flip.mbelshe@google.com2009-11-151-0/+1
| | | | | | | | | | TBR=wtc@chromium.org TEST=none BUG=none Review URL: http://codereview.chromium.org/387058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32028 0039d316-1c4b-4281-b951-d872f2087c98
* Fix multi-valued headers to and from the server.mbelshe@google.com2009-11-142-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | This is basically for Set-Cookie, but the solution is generic. If the HTTP layer had issued multiple, duplicate named headers, we send a single name-value pair where the value is a null-character separated list of the original headers. So: Set-Cookie: foo Set-Cookie: bar Becomes Set-cookie "foo\0bar" BUG=none TEST=none Review URL: http://codereview.chromium.org/391061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32007 0039d316-1c4b-4281-b951-d872f2087c98
* Propagate the "first party for cookies" from WebKit to the network stackwtc@chromium.org2009-11-132-1/+2
| | | | | | | | | | | | | | when we follow a redirect, because WebKit's MainResourceLoader::willSendRequest method may change the "first party for cookies" URL of the resource request. R=abarth BUG=25133 TEST=In Options menu, change cookie policy to "Accept cookies only from sites I visit" and then follow the instructions in issue 25133 comment 20. Review URL: http://codereview.chromium.org/385024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31951 0039d316-1c4b-4281-b951-d872f2087c98
* Fix crash if we get an EOF after a large packet with unterminated headers.cevans@chromium.org2009-11-131-1/+1
| | | | | | | | | | | Make sure we always start copying excess data to the start of the read buffer, even in the case where save_amount==0 and additional_save_amount!=0 BUG=27509 TEST=NONE Review URL: http://codereview.chromium.org/385088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31939 0039d316-1c4b-4281-b951-d872f2087c98
* Split *AndAdjustOffset() functions into their own header, to restore ↵pkasting@chromium.org2009-11-132-2/+4
| | | | | | | | | | utf_string_conversions.h to a simple, readable state. BUG=4010 TEST=none Review URL: http://codereview.chromium.org/387012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31928 0039d316-1c4b-4281-b951-d872f2087c98
* Close immediately if no context is setukai@chromium.org2009-11-131-1/+6
| | | | | | | | | | | | | | Profile::GetDefaultRequestContext() is initialized lazily, on the UI thread. So, if SocketStreamHost runs before it has gotten lazily initialized yet, SocketStream won't have context. In this case, SocketStream will die. Rather than that, just close immediately. BUG=none TEST=none Review URL: http://codereview.chromium.org/384077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31886 0039d316-1c4b-4281-b951-d872f2087c98
* Style nit -- bind asterisks to the left rather than right.eroman@chromium.org2009-11-133-3/+3
| | | | | | Review URL: http://codereview.chromium.org/384112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31884 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb LoadLog into SocketStreamukai@chromium.org2009-11-1313-216/+362
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/385003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31881 0039d316-1c4b-4281-b951-d872f2087c98
* Condense the output of LoadLog for empty BEGIN/END blocks.eroman@chromium.org2009-11-132-6/+23
| | | | | | | | Rather then printing across two lines, just do it on one line. Review URL: http://codereview.chromium.org/387043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31870 0039d316-1c4b-4281-b951-d872f2087c98
* Add LoadLog instrumentation to HttpNetworkTransaction, to tell how much time ↵eroman@chromium.org2009-11-133-8/+53
| | | | | | | | was spent reading/writing headers and reading/writing body. Review URL: http://codereview.chromium.org/384098 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31861 0039d316-1c4b-4281-b951-d872f2087c98
* After draining the body of a 401/407 response, verify thatwtc@chromium.org2009-11-124-11/+127
| | | | | | | | | | | | | | | | | the keep-alive connection is still connected and idle before reusing it for authentication restart. An impatient server may have closed the connection while waiting for the user to enter the username and password. In socket_test_util.cc, return the mock ERR_UNEXPECTED error synchronously. R=eroman BUG=21675 TEST=new unit test Review URL: http://codereview.chromium.org/389007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31846 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Coverity defects in the FLIP code.wtc@chromium.org2009-11-123-5/+5
| | | | | | | | | | | | | CID=6816 PASS_BY_VALUE CID=6817 PASS_BY_VALUE CID=7523 UNINIT_CTOR R=mbelshe BUG=none TEST=none Review URL: http://codereview.chromium.org/392012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31828 0039d316-1c4b-4281-b951-d872f2087c98
* Enable FLIP POST with unittest.mbelshe@google.com2009-11-128-84/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | Involved some refactoring of FlipStreamParser/FlipStream/FlipSession. I now want to merge FlipStream and FlipStreamParser. In this CL: * Update the FlipDelegate to remove unused methods and add the OnWriteCompleted() method. * Add a full state machine to the FlipStreamParser. This is the same state machine which is used by the HttpStreamParser, with only small changes. The FLIP side of this only needs the write-state right now, and as we merge the FlipStream and FlipStreamParser, I think we'll get the full state machine hashed out. * POST now works (minimally). I need more testing for large posts. But the unittests are updated (using the new delayed async mock socket work). BUG=none TEST=flip_network_transaction_unittest.cc Review URL: http://codereview.chromium.org/390016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31772 0039d316-1c4b-4281-b951-d872f2087c98
* Map a return value of 0 to ERR_CONNECTION_CLOSED forwtc@chromium.org2009-11-121-19/+16
| | | | | | | | | | | | | connection_->socket()->Read() in DoReadHeadersComplete and DoReadBodyComplete so that we catch both synchronous and asynchronous completion of Read. R=vandebo BUG=13289 TEST=none Review URL: http://codereview.chromium.org/384047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31739 0039d316-1c4b-4281-b951-d872f2087c98
* Enable async IO completions on MockSockets through thembelshe@google.com2009-11-112-22/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | SocketDataProvider. This makes a few changes: - The SocketDataProvider::GetNextRead() is now allowed to return a result of ERR_IO_PENDING. Previously, this was just an error. Now, this informs the MockClientSocket using the SocketDataProvider that the Mock IO will be completely asynchronously. - MockClientSocket implements a new method called OnReadComplete(). This method is used to asynchronously complete a Read from the SocketDataProvider. The MockClientSocket, after receiving ERR_IO_PENDING from SocketDataProvider::GetNextRead will be blocked until this call is made. The rest of the patch is just refactoring the MockTCPClientSocket to implement a true async-io simulation. It needs to record the user buffer from the initial read, and then fill it when the data is provided. BUG=none TEST=<this is for better testing> Review URL: http://codereview.chromium.org/392003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31723 0039d316-1c4b-4281-b951-d872f2087c98
* Http Cache: Split HttpCache::Transaction to its own setrvargas@google.com2009-11-114-1582/+1641
| | | | | | | | | | | | | of files. No real code change... I'm just moving code around. BUG=26729 TEST=none Review URL: http://codereview.chromium.org/387017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31693 0039d316-1c4b-4281-b951-d872f2087c98
* Metrics of SocketStreamukai@chromium.org2009-11-115-1/+186
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/380004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31650 0039d316-1c4b-4281-b951-d872f2087c98
* There was confusion in the mock socket classes due tombelshe@google.com2009-11-1110-426/+430
| | | | | | | | | | | | | | | | | | | overlapping names. The MockSocket is not actually a socket. It is an interface for fetching data for reads and writes on a socket. The MockClientSocket and MockTCPClientSocket are the actual sockets. Rename MockSocket to SocketDataProvider. Rename SSLMockSocket to SSLSocketDataProvider. Update all tests to reflect name change. BUG=none TEST=none Review URL: http://codereview.chromium.org/384024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31640 0039d316-1c4b-4281-b951-d872f2087c98
* Lands http://codereview.chromium.org/379007 for Dave:sky@chromium.org2009-11-111-0/+2
| | | | | | | | | | | | Fixes leak in BackingStore as shown by valgrind. XFree doesn't free the data of the image, where as XDestroyImage does. BUG=none TEST=none Review URL: http://codereview.chromium.org/391008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31633 0039d316-1c4b-4281-b951-d872f2087c98
* Use GURL::is_valid() in place of !GURL::is_empty() in a condition.eroman@chromium.org2009-11-102-1/+23
| | | | | | | | This is to be more consistent with another piece of code which tests is_valid() rather than is_empty(), in case there should be some difference between those. Review URL: http://codereview.chromium.org/385017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31614 0039d316-1c4b-4281-b951-d872f2087c98
* Add a couple of methods to the StaticMockSocket for verifyingmbelshe@google.com2009-11-101-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | that all data has been consumed from the Mock socket. Tests can optionally use this by including a zero-length read at the end of their data and then verifying that it is at the end. Example: MockWrite writes[] = { MockWrite( ... <data> ...), MockWrite( ... <data> ...), MockWrite( ... <data> ...), MockWrite(true, 0, 0), // Marks EOF } <run tests> EXPECT_EQ(mock_socket.at_write_eof()); TEST=this is the test BUG=none Review URL: http://codereview.chromium.org/385011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31605 0039d316-1c4b-4281-b951-d872f2087c98
* Grab SOCKS settings from system prefs.avi@chromium.org2009-11-101-1/+14
| | | | | | | | | BUG=http://crbug.com/13423 TEST=test SOCKS (ssh -D) proxying Review URL: http://codereview.chromium.org/383010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31594 0039d316-1c4b-4281-b951-d872f2087c98
* Distinguish between old and new FTP LIST response parsersphajdan.jr@chromium.org2009-11-102-10/+18
| | | | | | | | | | | | in FTP histograms. This should allow us to see how compatible the new parser is. TEST=none BUG=25520 Review URL: http://codereview.chromium.org/384007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31591 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of unused function, UTF8ToFilePathString.tony@chromium.org2009-11-101-12/+0
| | | | | | | | | | | | BUG=none TEST=none Original patch by hayato@google.com via: http://codereview.chromium.org/384003 Review URL: http://codereview.chromium.org/388010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31579 0039d316-1c4b-4281-b951-d872f2087c98
* After further discussion, do not try to handle memory errors, but make ↵vandebo@chromium.org2009-11-104-35/+15
| | | | | | | | | | | assertions about allocation parameters stronger. BUG=25826 TEST=none Review URL: http://codereview.chromium.org/378037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31574 0039d316-1c4b-4281-b951-d872f2087c98
* Pickup some server nits from the checkin on the GFE side.mbelshe@google.com2009-11-102-32/+49
| | | | | | | | | | | | No significant code changes here, just some renames, minor reworkings and comment additions. BUG=none TEST=none Review URL: http://codereview.chromium.org/372074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31564 0039d316-1c4b-4281-b951-d872f2087c98
* Use URLRequestContext's host_resolver instead of SystemHostResolver.ukai@chromium.org2009-11-101-1/+2
| | | | | | | | | | | For unittests, we can inject mock host_resolver via SetHostResolver(). BUG=none TEST=none Review URL: http://codereview.chromium.org/384001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31545 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a style nit in client_socket.h.wtc@chromium.org2009-11-103-49/+51
| | | | | | | | | | | | Use the |os_error| name consistently for all the function arguments and local variables that represent OS errors. R=eroman BUG=none TEST=none Review URL: http://codereview.chromium.org/374008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31537 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up recent string conversion function changes, part 1: Remove ↵pkasting@chromium.org2009-11-101-4/+4
| | | | | | | | | | | | unnecessary code. Thanks to a change in escape.cc I can basically revert the ICU conversions back to what they used to be; I can also get rid of half the conversions immediately since they aren't used. This does not split out the "adjust" versions of the UTF conversions into their own header/implementation; that's coming in the next patch. BUG=4010 TEST=none Review URL: http://codereview.chromium.org/380007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31533 0039d316-1c4b-4281-b951-d872f2087c98
* Fix integer overflow in calculation of sparse I/O extent.cevans@chromium.org2009-11-101-1/+1
| | | | | | | | | BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/372076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31532 0039d316-1c4b-4281-b951-d872f2087c98
* Switch chrome to requesting full-urls over FLIP rather thanmbelshe@google.com2009-11-102-18/+14
| | | | | | | | | | | | | | | URIs. This is so that the protocol (http/https) can be conveyed directly from the client. This makes the host header irrelevant. Will update the spec. Updated the unit tests to reflect the host header removal. TEST=flip_network_transaction_unittest.cc BUG=none Review URL: http://codereview.chromium.org/379011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31530 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some over-80-char lines.mbelshe@google.com2009-11-091-4/+11
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/381008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31506 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unnecessary null pointer tests to avoid a false Coveritywtc@chromium.org2009-11-091-7/+13
| | | | | | | | | | | | | | | | | | | FORWARD_NULL defect. In the for loop, at most one buffer in the |buffers| array is of type SECBUFFER_DATA and at most one is of type SECBUFFER_EXTRA. The null pointer test for decrypted_ptr_ is not necessary because when we encounter the only buffer of type SECBUFFER_DATA, decrypted_ptr_ must be NULL (the initial value). I added a DCHECK to assert that. Similarly the null pointer test for received_ptr_ is not necessary. R=mattm BUG=22286 CID=5331 TEST=one Review URL: http://codereview.chromium.org/371014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31499 0039d316-1c4b-4281-b951-d872f2087c98
* Use the new FTP LIST parsing code in the browser.phajdan.jr@chromium.org2009-11-073-6/+23
| | | | | | | | | | | Fall back to the old parsing code on errors. TEST=none BUG=25520 Review URL: http://codereview.chromium.org/343073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31379 0039d316-1c4b-4281-b951-d872f2087c98
* Disable an FTP test which contains a date with year 2079 due to year-2038 ↵phajdan.jr@chromium.org2009-11-071-0/+3
| | | | | | | | | | | | | | | | problem on Linux. The date wraps around then and gives nonsensical results (the field to store the timestamp is too short to store dates beyond year 2038). TBR=wtc TEST=none BUG=25520 Review URL: http://codereview.chromium.org/372044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31378 0039d316-1c4b-4281-b951-d872f2087c98
* Implement Windows FTP directory listing parser.phajdan.jr@chromium.org2009-11-079-2/+341
| | | | | | | | | TEST=Covered by net_unittests. BUG=25520 Review URL: http://codereview.chromium.org/374010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31376 0039d316-1c4b-4281-b951-d872f2087c98