summaryrefslogtreecommitdiffstats
path: root/net/base/net_util.h
Commit message (Collapse)AuthorAgeFilesLines
* Changes the UI for HTTP/FTP auth challenges to include the server's port. So ↵ericroman@google.com2009-05-211-8/+15
| | | | | | | | | | | instead of "www.foo.com" it will say "www.foo.com:80". We need to include the port number since otherwise it can be ambiguous what the actual target server is. This change also introduces utility function "GetHostAnd[Optional]Port()" to help with forming <host> [":" <port>] strings. BUG=12073 Review URL: http://codereview.chromium.org/112041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16672 0039d316-1c4b-4281-b951-d872f2087c98
* Include C system headers before C++ system headers.wtc@chromium.org2009-05-181-3/+4
| | | | | | | | | | | | | | | | Document that GetHostAndPort returns an IPv6 literal address with square brackets. Document that the host parameter to the ProxyServer constructor takes an IPv6 literal address with square brackets. R=eroman BUG=N/A TEST=N/A Review URL: http://codereview.chromium.org/113494 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16287 0039d316-1c4b-4281-b951-d872f2087c98
* This CL makes Chrome on par with Firefox in terms of 'GetSuggestedFilename' ↵jungshik@google.com2009-05-011-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | for file download via context-menu. For a download initiated with a click on a link in a web page, a webkit-side change is necessary, which will be done later. Add a field (referrer_charset) to URLRequestContext and DownloadCreateInfo. It's set to the character encoding of a document where the download request originates from when it's known (download initiated via "save as" in the context menu). If it's not known (a download initiated by clicking on a download link or typing a url directly to the omnibox), it's initialized to the default character encoding in the user's preference. I guess this is marginally better than leaving it empty (in that case, step 2b below will be skipped and step 2c will be taken) because a user has a better control over how raw 8bit characters in C-D are interpreted (especially on Windows where a reboot is required to change the OS default codepage). This is later passed to GetSuggestedFilename and used as one of fallback encodings (1. UTF-8, 2. origin_charset, 3. default OS codepage). With this change, we support the following: 1. RFC 2047 2. Raw-8bit-characters : a. UTF-8, b. origin_charset, c. default os codepage. 3. %-escaped UTF-8. In this CL, for #3, I didn't add a fallback similar to one used for #2. If necessary, it can be added easily. New entries are added to 3 existing tests. What's previously not covered (raw 8bit Content-Disposition header) is now covered in all 3 tests. BUG=1148 TEST=net unit test: NetUtilTest.GetFileNameFromCD NetUtilTest.GetSuggestedFilename unittest : DownloadManagerTest.TestDownloadFilename Review URL: http://codereview.chromium.org/83002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15113 0039d316-1c4b-4281-b951-d872f2087c98
* Switching things to FilePath:phajdan.jr@chromium.org2009-04-071-4/+0
| | | | | | | | | | | | | | | | Remove following deprecated wstring-using functions: net/net_util: FilePathToFileURL net/net_util: FileURLToFilePath Switch net/base/upload_data to FilePath. Switch upload-related parts of net/url_request/url_request to FilePath. Made necessary adjustments in rest of code (a lot). Review URL: http://codereview.chromium.org/63011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13242 0039d316-1c4b-4281-b951-d872f2087c98
* GetMyHostName is renamed GetHostName to match the name ofwtc@chromium.org2009-03-251-1/+1
| | | | | | | | | 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
* Remove unneeded includes of googleurl/src/url_parse.h and url_canon.h.thestig@chromium.org2009-03-121-2/+0
| | | | | | Review URL: http://codereview.chromium.org/42102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11502 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-111-1/+0
| | | | | | | | | Normalize end of file newlines in net/. All files end in a single newline. Review URL: http://codereview.chromium.org/43079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11442 0039d316-1c4b-4281-b951-d872f2087c98
* Implement the PAC js-binding for "myIpAddress()".ericroman@google.com2009-03-031-0/+3
| | | | | | | BUG=2764 Review URL: http://codereview.chromium.org/38001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10824 0039d316-1c4b-4281-b951-d872f2087c98
* Add js bindings layer for ProxyResolverV8 {"alert()", "dnsResolve()", ↵ericroman@google.com2009-03-021-0/+5
| | | | | | | | | | | "myIpAddress" <-- [partial]}. Also adds a utility function to net_util for turning a addrinfo into an IP address string. BUG=2764 Review URL: http://codereview.chromium.org/31009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10730 0039d316-1c4b-4281-b951-d872f2087c98
* Add IPv6 support to net::GetHostAndPort.ericroman@google.com2009-02-231-1/+1
| | | | | | Review URL: http://codereview.chromium.org/28015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10205 0039d316-1c4b-4281-b951-d872f2087c98
* Add parsing for PAC result strings -- ProxyInfo::UsePacString().ericroman@google.com2009-02-191-0/+13
| | | | | | | | | | | Added the support class ProxyServer to avoid losing the proxy server's type information (http, socks) when populating the list. The format of the configuration strings has been extended accordingly to include an optional [<scheme>"://"] prefix. (i.e. "http://", "socks4://", "socks5://"). Review URL: http://codereview.chromium.org/20398 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10010 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of kPathSeparator on windows. Port some wstring function to take ↵estade@chromium.org2008-12-041-0/+2
| | | | | | | | FilePaths. Re-enable relevant posix unit tests. Review URL: http://codereview.chromium.org/12893 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6387 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up some net/ code. Change a number of wstrings to FilePaths.estade@chromium.org2008-11-241-0/+3
| | | | | | Review URL: http://codereview.chromium.org/12409 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5944 0039d316-1c4b-4281-b951-d872f2087c98
* Port directory lister to allow the linux and mac test shells to display file ↵estade@chromium.org2008-11-201-5/+6
| | | | | | | | | | directories. This is a revision of r5725. It doesn't break mac build. Review URL: http://codereview.chromium.org/11507 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5792 0039d316-1c4b-4281-b951-d872f2087c98
* revert 5730estade@chromium.org2008-11-191-6/+5
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5731 0039d316-1c4b-4281-b951-d872f2087c98
* Port directory lister to posix.estade@chromium.org2008-11-191-5/+6
| | | | | | | | Fix of issue 11437. Review URL: http://codereview.chromium.org/11293 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5730 0039d316-1c4b-4281-b951-d872f2087c98
* revert 5725estade@chromium.org2008-11-191-6/+5
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5727 0039d316-1c4b-4281-b951-d872f2087c98
* Port directory lister so test shell can view file directories.estade@chromium.org2008-11-191-5/+6
| | | | | | Review URL: http://codereview.chromium.org/11437 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5725 0039d316-1c4b-4281-b951-d872f2087c98
* Change made by external contributor Ibrar Ahmed (ibrar.ahmad@gmail.com), ↵erikkay@google.com2008-11-111-0/+3
| | | | | | | | | | | | | | | reviewed by erikkay: http://codereview.chromium.org/6577/show ports listen_socket and telnet_server to POSIX I had to make some changes to get this to work on Mac and to fix a few regressions it caused in Windows, so please take a fresh look at this diff Dan. Ibrar, please take a look at the changes from your patch to mine (you may need to diff listen_socket_unittest.h with listen_socket_unittest.cc manually since I moved a bunch of code here). Some were bugs that I should have caught in review, some were bugs that only got tickled on the Mac, others were just cleanup. Comments welcome. Review URL: http://codereview.chromium.org/9260 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5153 0039d316-1c4b-4281-b951-d872f2087c98
* Unrollback 3024 (partially rolled back in 3027).ericroman@google.com2008-10-081-5/+0
| | | | | | | | 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
* Revert 3024, broke mac build.maruel@google.com2008-10-081-0/+5
| | | | | | 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-081-5/+0
| | | | | | | | 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
* Initial stab at http authentication (basic + digest) in new http stack.ericroman@google.com2008-09-271-0/+5
| | | | | | | | | | | | | | | | | | General design: - class HttpAuth -- utility class for http-auth logic. - class HttpAuth::ChallengeTokenizer -- parsing of www-Authenticate headers. - class HttpAuthHandler -- base class for authentication schemes (inspired by nsIHttpAuthenticator) - class HttpAuthHandlerBasic : HttpAuthHandler -- logic for basic auth. - class HttpAuthHandlerDigest : HttpAuthHandler -- logic for digest auth. - The auth integration in HttpNetworkTransaction mimics that of HttpTransactionWinHttp: + HttpNetworkTransaction::ApplyAuth() -- set the authorization headers. + HttpNetworkTransaction::PopulateAuthChallenge() -- process the challenges. BUG=2346 Review URL: http://codereview.chromium.org/4063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2658 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Add net_util* to the SCons build. Fixes some ICU UChar issues in net_util. ↵tc@google.com2008-08-211-1/+2
| | | | | | | | | Also disable NetUtilTest.FileURLConversion because it seems to have Windows specific output (is this the right thing to do?). The other changes to net_util_unittest is to get arraysize to work (see the comment in base/basictypes.h). git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1168 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some character conversions and Mac compile errors for net_util.cc.paulg@google.com2008-08-201-2/+9
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1112 0039d316-1c4b-4281-b951-d872f2087c98
* Move more net classes into the net namespace. Also remove the net_util ↵darin@google.com2008-07-311-2/+2
| | | | | | | | namespace in favor of the net namespace. This is a purely mechanical change. There should be no logic changes. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192 0039d316-1c4b-4281-b951-d872f2087c98
* Add net to the repository.initial.commit2008-07-261-0/+153
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14 0039d316-1c4b-4281-b951-d872f2087c98