Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: util/net/http_transport_win.cc

Issue 1339793002: win xp: Don't use ICU_REJECT_USERPWD with WinHttpCrackUrl (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@xp-all-access
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 LogErrorWinHttpMessage("WinHttpSetTimeouts"); 107 LogErrorWinHttpMessage("WinHttpSetTimeouts");
108 return false; 108 return false;
109 } 109 }
110 110
111 URL_COMPONENTS url_components = {0}; 111 URL_COMPONENTS url_components = {0};
112 url_components.dwStructSize = sizeof(URL_COMPONENTS); 112 url_components.dwStructSize = sizeof(URL_COMPONENTS);
113 url_components.dwHostNameLength = 1; 113 url_components.dwHostNameLength = 1;
114 url_components.dwUrlPathLength = 1; 114 url_components.dwUrlPathLength = 1;
115 url_components.dwExtraInfoLength = 1; 115 url_components.dwExtraInfoLength = 1;
116 std::wstring url_wide(base::UTF8ToUTF16(url())); 116 std::wstring url_wide(base::UTF8ToUTF16(url()));
117 // dwFlags = ICU_REJECT_USERPWD fails on XP. See "Community Additions" at:
118 // https://msdn.microsoft.com/en-us/library/aa384092.aspx
117 if (!WinHttpCrackUrl( 119 if (!WinHttpCrackUrl(
118 url_wide.c_str(), 0, ICU_REJECT_USERPWD, &url_components)) { 120 url_wide.c_str(), 0, 0, &url_components)) {
119 LogErrorWinHttpMessage("WinHttpCrackUrl"); 121 LogErrorWinHttpMessage("WinHttpCrackUrl");
120 return false; 122 return false;
121 } 123 }
122 DCHECK(url_components.nScheme == INTERNET_SCHEME_HTTP || 124 DCHECK(url_components.nScheme == INTERNET_SCHEME_HTTP ||
123 url_components.nScheme == INTERNET_SCHEME_HTTPS); 125 url_components.nScheme == INTERNET_SCHEME_HTTPS);
124 std::wstring host_name(url_components.lpszHostName, 126 std::wstring host_name(url_components.lpszHostName,
125 url_components.dwHostNameLength); 127 url_components.dwHostNameLength);
126 std::wstring url_path(url_components.lpszUrlPath, 128 std::wstring url_path(url_components.lpszUrlPath,
127 url_components.dwUrlPathLength); 129 url_components.dwUrlPathLength);
128 std::wstring extra_info(url_components.lpszExtraInfo, 130 std::wstring extra_info(url_components.lpszExtraInfo,
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 } 240 }
239 241
240 } // namespace 242 } // namespace
241 243
242 // static 244 // static
243 scoped_ptr<HTTPTransport> HTTPTransport::Create() { 245 scoped_ptr<HTTPTransport> HTTPTransport::Create() {
244 return scoped_ptr<HTTPTransportWin>(new HTTPTransportWin); 246 return scoped_ptr<HTTPTransportWin>(new HTTPTransportWin);
245 } 247 }
246 248
247 } // namespace crashpad 249 } // namespace crashpad
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698