summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* Add unit test for HttpResponseHeaders::GetStatusText()ericroman@google.com2008-09-132-10/+38
| | | | | | Review URL: http://codereview.chromium.org/2822 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2173 0039d316-1c4b-4281-b951-d872f2087c98
* TBR fix for broken compile on mac.ericroman@google.com2008-09-131-1/+1
| | | | | | | | i had committed some bad code which visual studio doesnt mind, but gcc notices. Review URL: http://codereview.chromium.org/2818 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2155 0039d316-1c4b-4281-b951-d872f2087c98
* misc. http response status-line changes:ericroman@google.com2008-09-139-83/+398
| | | | | | | | | | 1. check for http 0.9 responses (no status line) 2. allow up to 4 bytes of junk to precede the http version. 3. distinguish between the parsed vs normalized http version (a TODO needed this). Review URL: http://codereview.chromium.org/1934 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2153 0039d316-1c4b-4281-b951-d872f2087c98
* Add the EV metadata for two GlobalSign root CA certificates.wtc@google.com2008-09-111-0/+11
| | | | | | | | R=ifette BUG=2058 Review URL: http://codereview.chromium.org/2406 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2098 0039d316-1c4b-4281-b951-d872f2087c98
* Capture initial SCons build of {base,net,googleurl}_unittests on Mac:sgk@google.com2008-09-111-1/+6
| | | | | | | | | | | | | * Initial flags and options that mimick how XCode builds (e.g. XCode uses "gcc -x c++" to compile C++, but g++ to link it). * Load minimal set of SConscript files: base, googleurl, net, skia, testing, third_party. (breakpad and webkit to come.) * Correct .cc => .mm file names (multiple places). * Add base/{platform_thread,platform_test,worker_pool}_mac.mm. * Remove -Wall when we build Skia, like we do on Linux. Review URL: http://codereview.chromium.org/2435 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2097 0039d316-1c4b-4281-b951-d872f2087c98
* Remove all but one place in this file where we returnwtc@google.com2008-09-111-2/+3
| | | | | | | | | | | | ERR_FAILED. In the remaining place, log the original Win32 error code to help diagnose a failure in the field. R=darin Review URL: http://codereview.chromium.org/1927 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2066 0039d316-1c4b-4281-b951-d872f2087c98
* Declare the bool members next to each other so they canwtc@google.com2008-09-112-5/+5
| | | | | | | | | | | be packed. Fix indentation. R=eroman Review URL: http://codereview.chromium.org/1926 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2064 0039d316-1c4b-4281-b951-d872f2087c98
* CreateDirectory() should check if an existing path is actually a directory ↵mmoss@google.com2008-09-111-1/+0
| | | | | | | | before skipping it. Also update a couple instances and comments to reflect current behaviour (see also http://codereview.chromium.org/1681). Review URL: http://codereview.chromium.org/1709 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2060 0039d316-1c4b-4281-b951-d872f2087c98
* Fix IDNtoUnicode and unittest. jungshik@google.com2008-09-112-4/+9
| | | | | | | | | | | | | | | | | | | | 1. Check whether uloc_getdata returns the default locale because an invalid or unsupported (not a part of ICU data file we use) locale is passed. 2. Replace 'se' with 'sv' in IDNToUnicode test and change the corresponding test result to true. U+00C4 IS used in Swedish, but the result was set to false because the test results were machine generated with the same typo ('se' in place of 'sv') under en_US.UTF-8 locale on Linux and we ran this test only on Windows with en_US locale. 1st part of patch is by Matthias Reitinger <reimarvin@gmail.com> BUG=1153 TEST=NetUtilTest.IDNToUnicode passes in various locales, C, en_US, en_US.utf8, ja_JP.utf8, sv_SE.utf8, hi_IN.utf8, ru_RU.utf8, fr_CA Review URL: http://codereview.chromium.org/1655 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2052 0039d316-1c4b-4281-b951-d872f2087c98
* Remove all but one place in this file where we returnwtc@google.com2008-09-111-2/+6
| | | | | | | | | | | | ERR_FAILED. In the remaining place, log the original Win32 error code to help diagnose a failure in the field. R=darin Review URL: http://codereview.chromium.org/2401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2044 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the SSL tunnel establishment code so that itwtc@google.com2008-09-102-135/+62
| | | | | | | | | | | | | | | | | | | | | reuses the four states of writing the request headers and reading the response headers. Add a boolean member is_connect_method_ to tell, while we're in one of those four states, whether we're doing the HTTP CONNECT method (to set up a tunnel) or the real transaction. The motivation of this refactoring is that I need to read the response body when the CONNECT request fails, which makes me realize I'd need to duplicate more code with the original design. R=darin BUG=b/1272555 Review URL: http://codereview.chromium.org/1875 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2011 0039d316-1c4b-4281-b951-d872f2087c98
* Implement GetFreeDiskSpace for POSIX and GetSystemMemory for Linux.mark@chromium.org2008-09-102-6/+31
| | | | | | | | | Patch by Paweł Hajdan jr <phajdan.jr@gmail.com> http://codereview.chromium.org/1891 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2007 0039d316-1c4b-4281-b951-d872f2087c98
* Do a better job at bounding HexToInt.deanm@chromium.org2008-09-101-1/+1
| | | | | | | http://codereview.chromium.org/1703 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1994 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the pre-launch bzip2 hack.ericroman@google.com2008-09-101-23/+0
| | | | | | Review URL: http://codereview.chromium.org/1691 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1974 0039d316-1c4b-4281-b951-d872f2087c98
* Use gcc 4.2 for the Mac build. Fix up new warnings and errors pointed outmark@chromium.org2008-09-105-49/+46
| | | | | | | | | | by gcc 4.2: warning: 'C' has a field 'C::m_' whose type uses the anonymous namespace warning: missing braces around initializer for 'S' error: extra qualification 'C::' on member 'm' Review URL: http://codereview.chromium.org/1675 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1955 0039d316-1c4b-4281-b951-d872f2087c98
* This change implements the performance recommendation from: darin@google.com2008-09-091-13/+25
| | | | | | | | | | | | | | | http://msdn.microsoft.com/en-us/library/aa383153(VS.85).aspx This fixes the performance problem of resolving PAC query when WinHTTP AutoProxy service is running, which seems to at least be default on Vista and Win2k3. Contributed by griffinz@gmail.com BUG=1684 R=nsylvain Review URL: http://codereview.chromium.org/1657 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1924 0039d316-1c4b-4281-b951-d872f2087c98
* WinHttpSendRequest fails with SEC_E_ILLEGAL_MESSAGE whenwtc@google.com2008-09-091-0/+1
| | | | | | | | | | | | | it receives an unexpected_message alert message from the server. We should map SEC_E_ILLEGAL_MESSAGE to net::ERR_SSL_PROTOCOL_ERROR so that our TLS-intolerant server handling code will kick in. R=eroman BUG=1891 Review URL: http://codereview.chromium.org/1669 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1919 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Linux buildbot breakage on BlockFiles_Grow due to lingering cache files.mmoss@google.com2008-09-097-19/+36
| | | | | | | | | | | | | | The buildbot was breaking because temporary cache files were being created under /tmp, like "/tmp/cache_test\data_*", rather than under /tmp/cache_test, like "/tmp/cache_test/data_*". This prevented the files from being cleaned up when /tmp/cache_test was deleted, and after a few runs, the max of 256 cache files was reached, and the tests failed when they couldn't create more. The following changes were made: - Replace '\' with platform-dependent path separator in various places. - Define constant (same as Windows) for invalid Linux file handle to fix error where wrong value was tested. - Force cache initialization in block_files tests, otherwise it fails to create cache files after calling DeleteCache(). BUG=1917 Review URL: http://codereview.chromium.org/1840 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1918 0039d316-1c4b-4281-b951-d872f2087c98
* Build host_resolver on the Macmmentovai@google.com2008-09-094-12/+13
| | | | | | Review URL: http://codereview.chromium.org/1839 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1896 0039d316-1c4b-4281-b951-d872f2087c98
* Fix proxy code. The pac string was corrupted when a pacnsylvain@chromium.org2008-09-091-1/+2
| | | | | | | | | | | | | | | | | file was specified. This is because AsciiToWide returns a temporary object, and we use .c_str, but as soon as the line is executed, the object is destroyed and what was pointed by c_str is also deleted. Use a local variable instead. Thanks for griffinz@gmail.com for pointing the issue. Review URL: http://codereview.chromium.org/1838 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1890 0039d316-1c4b-4281-b951-d872f2087c98
* Rename "run net_unittests" to "run_net_unittests" like we do with other unitmmentovai@google.com2008-09-081-6/+6
| | | | | | | | test targets. Use a script that can be copied and pasted for all unit test targets by depending on the product name variable. Review URL: http://codereview.chromium.org/1637 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1872 0039d316-1c4b-4281-b951-d872f2087c98
* Get MIME stuff working minimally to the point where we haveerg@google.com2008-09-082-5/+48
| | | | | | | | | unit tests passing. B=1315 Review URL: http://codereview.chromium.org/1824 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1866 0039d316-1c4b-4281-b951-d872f2087c98
* Replace all instances of <hash_map> with a "base/hash_tabe.h",erg@google.com2008-09-085-11/+6
| | | | | | | | | | | which does the right thing based on whatever platform we're compiling for, along with changing the hardcoded "stdext::", which is a MSVC++ism to use base::hash_{map,set}. B=1869 Review URL: http://codereview.chromium.org/1629 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1862 0039d316-1c4b-4281-b951-d872f2087c98
* Normalize leading LWS in line continuations, per Wan-Teh's suggestion.ericroman@google.com2008-09-082-15/+70
| | | | | | Review URL: http://codereview.chromium.org/1802 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1861 0039d316-1c4b-4281-b951-d872f2087c98
* [new http] Normalize line continuations in response headers.ericroman@google.com2008-09-065-27/+347
| | | | | | | | BUG=1272571 Review URL: http://codereview.chromium.org/458 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1818 0039d316-1c4b-4281-b951-d872f2087c98
* The previous fix doesn't work. We should continuewtc@google.com2008-09-051-4/+10
| | | | | | | | | | | decrypting if there is still extra data to decrypt, and read more if there is no data to decrypt. R=darin BUG=b/1329345,b/1329363 Review URL: http://codereview.chromium.org/480 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1814 0039d316-1c4b-4281-b951-d872f2087c98
* This fixes the "passing NULL to non-pointer argument" warning when compiling ↵mmoss@google.com2008-09-051-1/+1
| | | | | | | | with gcc 4.1, and is consistent with the way EXPECT_EQ uses NULL elsewhere in Chrome. Review URL: http://codereview.chromium.org/267 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1813 0039d316-1c4b-4281-b951-d872f2087c98
* Modify HostResolver slightly to build on posix as well as windows.dkegel@google.com2008-09-054-1/+57
| | | | | | Review URL: http://codereview.chromium.org/403 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1799 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a crash caused by a NULL FILETIME when creating ftptc@google.com2008-09-042-3/+42
| | | | | | | | | directory listings. BUG=1350006 Review URL: http://codereview.chromium.org/419 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1722 0039d316-1c4b-4281-b951-d872f2087c98
* If we didn't read enough to be able to decrypt anything,wtc@google.com2008-09-041-0/+4
| | | | | | | | | | | go back to read more rather than reporting 0 bytes read, which would be interpreted as EOF. R=darin BUG=b/1329345,b/1329363 Review URL: http://codereview.chromium.org/217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1705 0039d316-1c4b-4281-b951-d872f2087c98
* Minor cleanup to OneShotTimer and RepeatingTimer: moves more of the member ↵darin@google.com2008-09-032-60/+35
| | | | | | | | | | | variables into the Task subclass. Also included in this change: deprecate MessageLoop::timer_manager(), and change consumers over to use OneShotTimer or RepeatingTimer. R=beng BUG=1346553 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1684 0039d316-1c4b-4281-b951-d872f2087c98
* Fix an out of band read when parsing a URL component of just "%". The ↵deanm@google.com2008-09-032-3/+3
| | | | | | | | calculation of max_digit_index is unsigned, and was underflowing when max was less than 2. BUG=122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1677 0039d316-1c4b-4281-b951-d872f2087c98
* Move icu.xcodeproj into the icu38 directory, as is done with all othermmentovai@google.com2008-09-031-3/+3
| | | | | | | xcodeprojs git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1675 0039d316-1c4b-4281-b951-d872f2087c98
* Normalize newlines to LF in netmmentovai@google.com2008-09-025-199/+199
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1647 0039d316-1c4b-4281-b951-d872f2087c98
* Initial pass at simple event tracing. I added a few traces to tcp_socket ↵erikkay@google.com2008-09-021-0/+14
| | | | | | | | | | | | and test_shell to get an idea of what a simple trace might look like. Here's a sample output line: 11:24:19.660604 0x1e278:0x1e24c BEGIN url.load [0x5 http://mail.google.com/mail/] <E:\src\cr\src\webkit\tools\test_shell\test_webview_delegate.cc:189> format is:hh:mm:ss.us pid:tid TYPE NAME [id, extra] <file:line> git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1641 0039d316-1c4b-4281-b951-d872f2087c98
* Unit tests can't access the outside world.maruel@google.com2008-09-021-4/+8
| | | | | | TBR=wtc git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1638 0039d316-1c4b-4281-b951-d872f2087c98
* Update net.xcodeproj with an 'All' target (like base).sgk@google.com2008-09-011-0/+67
| | | | | | TBR: awalker git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1609 0039d316-1c4b-4281-b951-d872f2087c98
* Update Copyright text in SCons config files.sgk@google.com2008-09-012-56/+8
| | | | | | TBR: beng git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1607 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the mac build.rvargas@google.com2008-08-291-0/+2
| | | | | | | | TBR=pamg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1568 0039d316-1c4b-4281-b951-d872f2087c98
* Fixing the comment that was not included with the last cl.rvargas@google.com2008-08-291-0/+5
| | | | | | | TBR=darin git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1554 0039d316-1c4b-4281-b951-d872f2087c98
* Add another disk cache performance test.rvargas@google.com2008-08-291-0/+45
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1553 0039d316-1c4b-4281-b951-d872f2087c98
* Disk cache: Split deleting old entries from the cache into small chunks that ↵rvargas@google.com2008-08-292-3/+13
| | | | | | | | | | | | run through the message loop to improve responsiveness of the io thread. BUG=1345851 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1552 0039d316-1c4b-4281-b951-d872f2087c98
* Fix net_unittests hang observed on Vista. It turns out that a subpump wasdarin@google.com2008-08-291-11/+0
| | | | | | | | | | | | | | | | | being run within shell32, which was causing our kHaveWorkMsg to get dispatched. However, because that was occuring outside the context of a MessagePump::Run call, the handler for kHaveWorkMsg was returning early. Unfortunately, this means that it was failing to reset the have_work_ sentinel to 0. Because of that future calls to ScheduleWork would always be a no-op (as they return early when have_work_ is already set to 1). The proper fix is to just re-order the calls so that ProcessPumpReplacementMessage always runs in response to kHaveWorkMsg, but we still suppress calling DoWork until we are inside MessagePump::Run. TBR=rvargas,jar git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1544 0039d316-1c4b-4281-b951-d872f2087c98
* Hack to keep vista net_unittests from hanging while I investigate a proper fix.darin@google.com2008-08-291-0/+11
| | | | | | | TBR=rvargas git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1540 0039d316-1c4b-4281-b951-d872f2087c98
* If we receive an HTTP authentication header with a non-ASCIIwtc@google.com2008-08-281-3/+3
| | | | | | | | | | | | | realm string, the ASCIIToWide call in PopulateAuthChallenge hits a DCHECK failure. Change the ASCIIToWide call to a base::SysNativeMBToWide call, which produces the correct result when the OS "language for non-Unicode programs" is set to the language of the realm string. R=darin,jungshik BUG=1348130 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1504 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify OneShotTimer and RepeatingTimer. Fix up all consumers.darin@google.com2008-08-285-45/+28
| | | | | | | | | | | | | | | | | | | | | | | | Major changes: OneShotTimer and RepeatingTimer become template classes that no longer require a Task or a Timer object. They just use PostDelayedTask. Under the hood that still uses a Timer object. The API is much simpler for consumers as they now no longer need to worry about allocating a Task or managing the lifetime of the object pointer held by the Task. I added some new unit tests to timer_unittest.cc to cover the API. I preserved the old TimerManager / Timer API for now, but I plan to soon kill it. R=brettw BUG=1346553 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1502 0039d316-1c4b-4281-b951-d872f2087c98
* Run some disk cache unit tests on the Macmmentovai@google.com2008-08-2810-34/+59
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1475 0039d316-1c4b-4281-b951-d872f2087c98
* Move std::string16 to base::string16. Don't pollute the std namespace. Don'tmmentovai@google.com2008-08-272-5/+5
| | | | | | assume that all string types can be represented as std::basic_string<CHAR>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1464 0039d316-1c4b-4281-b951-d872f2087c98
* Add more net unit tests to linux.rvargas@google.com2008-08-271-6/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1461 0039d316-1c4b-4281-b951-d872f2087c98
* On .mm files in net and base:mmentovai@google.com2008-08-271-31/+6
| | | | | | | | - Update the license boilerplate - Set svn:eol-style properly - Get rid of trailing whitespace git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1455 0039d316-1c4b-4281-b951-d872f2087c98