ReactOS 0.4.16-dev-2491-g3dc6630
url.c
Go to the documentation of this file.
1/*
2 * Copyright 2008 Hans Leidekker
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19#include <stdarg.h>
20
21#include "windef.h"
22#include "winbase.h"
23#include "winnls.h"
24#include "winhttp.h"
25
26#include "wine/test.h"
27
28static WCHAR empty[] = {0};
29static WCHAR ftp[] = {'f','t','p',0};
30static WCHAR http[] = {'h','t','t','p',0};
31static WCHAR winehq[] = {'w','w','w','.','w','i','n','e','h','q','.','o','r','g',0};
32static WCHAR username[] = {'u','s','e','r','n','a','m','e',0};
33static WCHAR password[] = {'p','a','s','s','w','o','r','d',0};
34static WCHAR about[] = {'/','s','i','t','e','/','a','b','o','u','t',0};
35static WCHAR query[] = {'?','q','u','e','r','y',0};
36static WCHAR escape[] = {' ','!','"','#','$','%','&','\'','(',')','*','+',',','-','.','/',':',';','<','=','>',
37 '?','@','[','\\',']','^','_','`','{','|','}','~',0};
38static WCHAR escape2[] = {'\r',0x1f,' ','\n',0x7f,'\r','\n',0};
39static WCHAR escape3[] = {'?','t','e','x','t','=',0xfb00,0};
40static WCHAR escape4[] = {'/','t','e','x','t','=',0xfb00,0};
41
42static const WCHAR url1[] = L"http://username:password@www.winehq.org/site/about?query";
43static const WCHAR url2[] = L"http://username:";
44static const WCHAR url3[] = L"http://www.winehq.org/site/about?query";
45static const WCHAR url4[] = L"http://";
46static const WCHAR url5[] = L"ftp://username:password@www.winehq.org:80/site/about?query";
47static const WCHAR url6[] = L"http://username:password@www.winehq.org:42/site/about?query";
48static const WCHAR url7[] = L"http://username:password@www.winehq.org/site/about%20!%22%23$%25&'()"
49 "*+,-./:;%3C=%3E?@%5B%5C%5D%5E_%60%7B%7C%7D%7E";
50static const WCHAR url8[] = L"http://username:password@www.winehq.org:0/site/about?query";
51static const WCHAR url9[] = L"http://username:password@www.winehq.org:80/site/about?query";
52static const WCHAR url10[] = L"https://username:password@www.winehq.org:443/site/about?query";
53static const WCHAR url11[] = L"http://example.net/path?var1=example@example.com&var2=x&var3=y";
54static const WCHAR url12[] = L"https://tools.google.com/service/update2?w=3:BxDHoWy8ezM";
55static const WCHAR url13[] = L"http://winehq.o g/path with spaces";
56static const WCHAR url14[] = L"http://www.winehq.org/test";
57static const WCHAR url15[] = L"http://winehq.org:65536";
58static const WCHAR url16[] = L"http://winehq.org:0";
59static const WCHAR url17[] = L"http://winehq.org:";
60static const WCHAR url18[] = L"http://%0D%1F%20%0A%7F%0D%0A";
61static const WCHAR url19[] = L"http://?text=\xfb00";
62static const WCHAR url20[] = L"http:///text=\xfb00";
63static const WCHAR url21[] = L"https://nba2k19-ws.2ksports.com:19133/nba/v4/Accounts/get_account?x=3789526775265663876";
64static const WCHAR url22[] = L"http://winehq.org:/";
65
66static const WCHAR url_k1[] = L"http://username:password@www.winehq.org/site/about";
67static const WCHAR url_k2[] = L"http://www.winehq.org";
68static const WCHAR url_k3[] = L"https://www.winehq.org/post?";
69static const WCHAR url_k4[] = L"HTTP:www.winehq.org";
70static const WCHAR url_k5[] = L"http:/www.winehq.org";
71static const WCHAR url_k6[] = L"www.winehq.org";
72static const WCHAR url_k7[] = L"www";
73static const WCHAR url_k8[] = L"http";
74static const WCHAR url_k9[] = L"http://winehq?";
75static const WCHAR url_k10[] = L"http://winehq/post;a";
76
78{
79 uc->dwStructSize = sizeof(URL_COMPONENTS);
80 uc->lpszScheme = http;
83 uc->lpszHostName = winehq;
85 uc->nPort = 80;
90 uc->lpszUrlPath = about;
92 uc->lpszExtraInfo = query;
94}
95
96static void WinHttpCreateUrl_test( void )
97{
99 WCHAR *url;
100 DWORD len, err;
101 BOOL ret;
102
103 /* NULL components */
104 len = ~0u;
105 SetLastError( 0xdeadbeef );
106 ret = WinHttpCreateUrl( NULL, 0, NULL, &len );
107 ok( !ret, "expected failure\n" );
108 ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %lu\n", GetLastError() );
109 ok( len == ~0u, "expected len ~0u got %lu\n", len );
110
111 /* zero'ed components */
112 memset( &uc, 0, sizeof(URL_COMPONENTS) );
113 SetLastError( 0xdeadbeef );
114 ret = WinHttpCreateUrl( &uc, 0, NULL, &len );
115 ok( !ret, "expected failure\n" );
116 ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %lu\n", GetLastError() );
117 ok( len == ~0u, "expected len ~0u got %lu\n", len );
118
119 /* valid components, NULL url, NULL length */
120 fill_url_components( &uc );
121 SetLastError( 0xdeadbeef );
122 ret = WinHttpCreateUrl( &uc, 0, NULL, NULL );
123 ok( !ret, "expected failure\n" );
124 ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %lu\n", GetLastError() );
125
126 /* valid components, NULL url, insufficient length */
127 len = 0;
128 SetLastError( 0xdeadbeef );
129 ret = WinHttpCreateUrl( &uc, 0, NULL, &len );
130 ok( !ret, "expected failure\n" );
131 ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER got %lu\n", GetLastError() );
132 ok( len == 57, "expected len 57 got %lu\n", len );
133
134 /* valid components, NULL url, sufficient length */
135 SetLastError( 0xdeadbeef );
136 len = 256;
137 ret = WinHttpCreateUrl( &uc, 0, NULL, &len );
138 err = GetLastError();
139 ok( !ret, "expected failure\n" );
141 "expected ERROR_INVALID_PARAMETER got %lu\n", GetLastError() );
142 ok( len == 256 || broken(len == 57) /* < win7 */, "expected len 256 got %lu\n", len );
143
144 /* correct size, NULL url */
145 fill_url_components( &uc );
146 SetLastError( 0xdeadbeef );
147 ret = WinHttpCreateUrl( &uc, 0, NULL, &len );
148 err = GetLastError();
149 ok( !ret, "expected failure\n" );
151 "expected ERROR_INVALID_PARAMETER got %lu\n", GetLastError() );
152 ok( len == 256 || broken(len == 57) /* < win7 */, "expected len 256 got %lu\n", len );
153
154 /* valid components, allocated url, short length */
155 SetLastError( 0xdeadbeef );
156 url = HeapAlloc( GetProcessHeap(), 0, 256 * sizeof(WCHAR) );
157 url[0] = 0;
158 len = 2;
159 ret = WinHttpCreateUrl( &uc, 0, url, &len );
160 ok( !ret, "expected failure\n" );
161 ok( GetLastError() == ERROR_INSUFFICIENT_BUFFER, "expected ERROR_INSUFFICIENT_BUFFER got %lu\n", GetLastError() );
162 ok( len == 57, "expected len 57 got %lu\n", len );
163
164 /* allocated url, NULL scheme */
165 SetLastError( 0xdeadbeef );
166 uc.lpszScheme = NULL;
167 url[0] = 0;
168 len = 256;
169 ret = WinHttpCreateUrl( &uc, 0, url, &len );
170 ok( ret, "expected success\n" );
171 ok( GetLastError() == ERROR_SUCCESS || broken(GetLastError() == 0xdeadbeef) /* < win7 */,
172 "expected ERROR_SUCCESS got %lu\n", GetLastError() );
173 ok( len == 56, "expected len 56 got %lu\n", len );
174 ok( !lstrcmpW( url, url1 ), "url doesn't match\n" );
175
176 /* allocated url, 0 scheme */
177 fill_url_components( &uc );
178 uc.nScheme = 0;
179 url[0] = 0;
180 len = 256;
181 ret = WinHttpCreateUrl( &uc, 0, url, &len );
182 ok( ret, "expected success\n" );
183 ok( len == 56, "expected len 56 got %lu\n", len );
184
185 /* valid components, allocated url */
186 fill_url_components( &uc );
187 url[0] = 0;
188 len = 256;
189 ret = WinHttpCreateUrl( &uc, 0, url, &len );
190 ok( ret, "expected success\n" );
191 ok( len == 56, "expected len 56 got %lu\n", len );
192 ok( !lstrcmpW( url, url1 ), "url doesn't match\n" );
193
194 /* valid username, NULL password */
195 fill_url_components( &uc );
196 uc.lpszPassword = NULL;
197 url[0] = 0;
198 len = 256;
199 ret = WinHttpCreateUrl( &uc, 0, url, &len );
200 ok( ret, "expected success\n" );
201
202 /* valid username, empty password */
203 fill_url_components( &uc );
204 uc.lpszPassword = empty;
205 url[0] = 0;
206 len = 256;
207 ret = WinHttpCreateUrl( &uc, 0, url, &len );
208 ok( ret, "expected success\n" );
209 ok( len == 56, "expected len 56 got %lu\n", len );
210 ok( !lstrcmpW( url, url2 ), "url doesn't match\n" );
211
212 /* valid password, NULL username */
213 fill_url_components( &uc );
214 SetLastError( 0xdeadbeef );
215 uc.lpszUserName = NULL;
216 url[0] = 0;
217 len = 256;
218 ret = WinHttpCreateUrl( &uc, 0, url, &len );
219 ok( !ret, "expected failure\n" );
220 ok( GetLastError() == ERROR_INVALID_PARAMETER, "expected ERROR_INVALID_PARAMETER got %lu\n", GetLastError() );
221
222 /* valid password, empty username */
223 fill_url_components( &uc );
224 uc.lpszUserName = empty;
225 url[0] = 0;
226 len = 256;
227 ret = WinHttpCreateUrl( &uc, 0, url, &len );
228 ok( ret, "expected success\n");
229
230 /* NULL username, NULL password */
231 fill_url_components( &uc );
232 uc.lpszUserName = NULL;
233 uc.lpszPassword = NULL;
234 url[0] = 0;
235 len = 256;
236 ret = WinHttpCreateUrl( &uc, 0, url, &len );
237 ok( ret, "expected success\n" );
238 ok( len == 38, "expected len 38 got %lu\n", len );
239 ok( !lstrcmpW( url, url3 ), "url doesn't match\n" );
240
241 /* empty username, empty password */
242 fill_url_components( &uc );
243 uc.lpszUserName = empty;
244 uc.lpszPassword = empty;
245 url[0] = 0;
246 len = 256;
247 ret = WinHttpCreateUrl( &uc, 0, url, &len );
248 ok( ret, "expected success\n" );
249 ok( len == 56, "expected len 56 got %lu\n", len );
250 ok( !lstrcmpW( url, url4 ), "url doesn't match\n" );
251
252 /* nScheme has lower precedence than lpszScheme */
253 fill_url_components( &uc );
254 uc.lpszScheme = ftp;
256 url[0] = 0;
257 len = 256;
258 ret = WinHttpCreateUrl( &uc, 0, url, &len );
259 ok( ret, "expected success\n" );
260 ok( len == lstrlenW( url5 ), "expected len %d got %lu\n", lstrlenW( url5 ) + 1, len );
261 ok( !lstrcmpW( url, url5 ), "url doesn't match\n" );
262
263 /* non-standard port */
264 uc.lpszScheme = http;
266 uc.nPort = 42;
267 url[0] = 0;
268 len = 256;
269 ret = WinHttpCreateUrl( &uc, 0, url, &len );
270 ok( ret, "expected success\n" );
271 ok( len == 59, "expected len 59 got %lu\n", len );
272 ok( !lstrcmpW( url, url6 ), "url doesn't match\n" );
273
274 /* escape extra info */
275 fill_url_components( &uc );
278 url[0] = 0;
279 len = 256;
281 ok( ret, "expected success\n" );
282 ok( len == 113, "expected len 113 got %lu\n", len );
283 ok( !lstrcmpW( url, url7 ), "url doesn't match %s\n", wine_dbgstr_w(url) );
284
285 /* escape extra info */
286 memset( &uc, 0, sizeof(uc) );
287 uc.dwStructSize = sizeof(uc);
290 url[0] = 0;
291 len = 256;
293 ok( ret, "expected success\n" );
294 ok( len == lstrlenW(url18), "expected len %u got %lu\n", lstrlenW(url18), len );
295 ok( !lstrcmpW( url, url18 ), "url doesn't match\n" );
296
297 /* extra info with Unicode characters */
298 memset( &uc, 0, sizeof(uc) );
299 uc.dwStructSize = sizeof(uc);
302 url[0] = 0;
303 len = 256;
304 SetLastError( 0xdeadbeef );
306 err = GetLastError();
307 ok( !ret || GetACP() == CP_UTF8, "expected failure\n" );
308 ok( err == ERROR_INVALID_PARAMETER || (!err && GetACP() == CP_UTF8), "got %lu\n", err );
309
310 /* extra info with Unicode characters, no ICU_ESCAPE */
311 memset( &uc, 0, sizeof(uc) );
312 uc.dwStructSize = sizeof(uc);
315 url[0] = 0;
316 len = 256;
317 ret = WinHttpCreateUrl( &uc, 0, url, &len );
318 ok( ret || broken(!ret) /* < win7 */, "expected success\n" );
319 if (ret)
320 {
321 ok( len == lstrlenW(url19), "expected len %u got %lu\n", lstrlenW(url19), len );
322 ok( !lstrcmpW( url, url19 ), "url doesn't match %s\n", wine_dbgstr_w(url) );
323 }
324
325 /* escape path */
326 memset( &uc, 0, sizeof(uc) );
327 uc.dwStructSize = sizeof(uc);
328 uc.lpszUrlPath = escape2;
330 url[0] = 0;
331 len = 256;
333 ok( ret, "expected success\n" );
334 ok( len == lstrlenW(url18), "expected len %u got %lu\n", lstrlenW(url18), len );
335 ok( !lstrcmpW( url, url18 ), "url doesn't match\n" );
336
337 /* path with Unicode characters */
338 memset( &uc, 0, sizeof(uc) );
339 uc.dwStructSize = sizeof(uc);
340 uc.lpszUrlPath = escape4;
342 url[0] = 0;
343 len = 256;
344 SetLastError( 0xdeadbeef );
346 err = GetLastError();
347 ok( !ret || GetACP() == CP_UTF8, "expected failure\n" );
348 ok( err == ERROR_INVALID_PARAMETER || (!err && GetACP() == CP_UTF8), "got %lu\n", err );
349
350 /* path with Unicode characters, no ICU_ESCAPE */
351 memset( &uc, 0, sizeof(uc) );
352 uc.dwStructSize = sizeof(uc);
353 uc.lpszUrlPath = escape4;
355 url[0] = 0;
356 len = 256;
357 ret = WinHttpCreateUrl( &uc, 0, url, &len );
358 ok( ret || broken(!ret) /* < win7 */, "expected success\n" );
359 if (ret)
360 {
361 ok( len == lstrlenW(url20), "expected len %u got %lu\n", lstrlenW(url20), len );
362 ok( !lstrcmpW( url, url20 ), "url doesn't match %s\n", wine_dbgstr_w(url) );
363 }
364
365 /* NULL lpszScheme, 0 nScheme and nPort */
366 fill_url_components( &uc );
367 uc.lpszScheme = NULL;
368 uc.dwSchemeLength = 0;
369 uc.nScheme = 0;
370 uc.nPort = 0;
371 url[0] = 0;
372 len = 256;
373 ret = WinHttpCreateUrl( &uc, 0, url, &len );
374 ok( ret, "expected success\n" );
375 ok( len == 58, "expected len 58 got %lu\n", len );
376 ok( !lstrcmpW( url, url8 ), "url doesn't match\n" );
377
378 HeapFree( GetProcessHeap(), 0, url );
379}
380
382{
383 memset( uc, 0, sizeof(URL_COMPONENTS) );
384 uc->dwStructSize = sizeof(URL_COMPONENTS);
385 uc->dwSchemeLength = ~0u;
386 uc->dwHostNameLength = 1;
387 uc->nPort = 0;
388 uc->dwUserNameLength = ~0u;
389 uc->dwPasswordLength = ~0u;
390 uc->dwUrlPathLength = ~0u;
391 uc->dwExtraInfoLength = ~0u;
392}
393
394static void WinHttpCrackUrl_test( void )
395{
397 WCHAR scheme[20], user[20], pass[20], host[40], path[80], extra[40];
398 DWORD error;
399 BOOL ret;
400
401 /* buffers of sufficient length */
402 scheme[0] = user[0] = pass[0] = host[0] = path[0] = extra[0] = 0;
403
404 uc.dwStructSize = sizeof(URL_COMPONENTS);
405 uc.nScheme = 0;
406 uc.lpszScheme = scheme;
407 uc.dwSchemeLength = 20;
408 uc.lpszUserName = user;
409 uc.dwUserNameLength = 20;
410 uc.lpszPassword = pass;
411 uc.dwPasswordLength = 20;
412 uc.lpszHostName = host;
413 uc.dwHostNameLength = 20;
414 uc.nPort = 0;
415 uc.lpszUrlPath = path;
416 uc.dwUrlPathLength = 40;
417 uc.lpszExtraInfo = extra;
418 uc.dwExtraInfoLength = 20;
419
420 ret = WinHttpCrackUrl( url1, 0, 0, &uc );
421 ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
422 ok( uc.nScheme == INTERNET_SCHEME_HTTP, "unexpected scheme: %u\n", uc.nScheme );
423 ok( !memcmp( uc.lpszScheme, http, sizeof(http) ), "unexpected scheme: %s\n", wine_dbgstr_w(uc.lpszScheme) );
424 ok( uc.dwSchemeLength == 4, "unexpected scheme length: %lu\n", uc.dwSchemeLength );
425 ok( !memcmp( uc.lpszUserName, username, sizeof(username) ), "unexpected username: %s\n", wine_dbgstr_w(uc.lpszUserName) );
426 ok( uc.dwUserNameLength == 8, "unexpected username length: %lu\n", uc.dwUserNameLength );
427 ok( !memcmp( uc.lpszPassword, password, sizeof(password) ), "unexpected password: %s\n", wine_dbgstr_w(uc.lpszPassword) );
428 ok( uc.dwPasswordLength == 8, "unexpected password length: %lu\n", uc.dwPasswordLength );
429 ok( !memcmp( uc.lpszHostName, winehq, sizeof(winehq) ), "unexpected hostname: %s\n", wine_dbgstr_w(uc.lpszHostName) );
430 ok( uc.dwHostNameLength == 14, "unexpected hostname length: %lu\n", uc.dwHostNameLength );
431 ok( uc.nPort == 80, "unexpected port: %u\n", uc.nPort );
432 ok( !memcmp( uc.lpszUrlPath, about, sizeof(about) ), "unexpected path: %s\n", wine_dbgstr_w(uc.lpszUrlPath) );
433 ok( uc.dwUrlPathLength == 11, "unexpected path length: %lu\n", uc.dwUrlPathLength );
434 ok( !memcmp( uc.lpszExtraInfo, query, sizeof(query) ), "unexpected extra info: %s\n", wine_dbgstr_w(uc.lpszExtraInfo) );
435 ok( uc.dwExtraInfoLength == 6, "unexpected extra info length: %lu\n", uc.dwExtraInfoLength );
436
437 /* buffers of insufficient length */
438 uc.dwSchemeLength = 1;
439 uc.dwHostNameLength = 1;
440 uc.dwUrlPathLength = 40; /* sufficient */
441 SetLastError( 0xdeadbeef );
442 ret = WinHttpCrackUrl( url1, 0, 0, &uc );
444 ok( !ret, "WinHttpCrackUrl succeeded\n" );
445 ok( error == ERROR_INSUFFICIENT_BUFFER, "got %lu, expected ERROR_INSUFFICIENT_BUFFER\n", error );
446 ok( uc.dwSchemeLength == 5, "unexpected scheme length: %lu\n", uc.dwSchemeLength );
447 ok( uc.dwHostNameLength == 15, "unexpected hostname length: %lu\n", uc.dwHostNameLength );
448 ok( uc.dwUrlPathLength == 11, "unexpected path length: %lu\n", uc.dwUrlPathLength );
449
450 /* no buffers */
452 SetLastError( 0xdeadbeef );
453 ret = WinHttpCrackUrl( url_k1, 0, 0, &uc);
455 ok( ret, "WinHttpCrackUrl failed le = %lu\n", error );
457 "got %lu, expected ERROR_SUCCESS\n", error );
458 ok( uc.nScheme == INTERNET_SCHEME_HTTP, "unexpected scheme\n" );
459 ok( uc.lpszScheme == url_k1,"unexpected scheme\n" );
460 ok( uc.dwSchemeLength == 4, "unexpected scheme length\n" );
461 ok( uc.lpszUserName == url_k1 + 7, "unexpected username\n" );
462 ok( uc.dwUserNameLength == 8, "unexpected username length\n" );
463 ok( uc.lpszPassword == url_k1 + 16, "unexpected password\n" );
464 ok( uc.dwPasswordLength == 8, "unexpected password length\n" );
465 ok( uc.lpszHostName == url_k1 + 25, "unexpected hostname\n" );
466 ok( uc.dwHostNameLength == 14, "unexpected hostname length\n" );
467 ok( uc.nPort == 80, "unexpected port: %u\n", uc.nPort );
468 ok( uc.lpszUrlPath == url_k1 + 39, "unexpected path\n" );
469 ok( uc.dwUrlPathLength == 11, "unexpected path length\n" );
470 ok( uc.lpszExtraInfo == url_k1 + 50, "unexpected extra info\n" );
471 ok( uc.dwExtraInfoLength == 0, "unexpected extra info length\n" );
472
476 ret = WinHttpCrackUrl( url_k2, 0, 0,&uc);
477 ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
478 ok( uc.nScheme == INTERNET_SCHEME_HTTP, "unexpected scheme\n" );
479 ok( uc.lpszScheme == url_k2, "unexpected scheme\n" );
480 ok( uc.dwSchemeLength == 4, "unexpected scheme length\n" );
481 ok( uc.lpszUserName == NULL ,"unexpected username\n" );
482 ok( uc.dwUserNameLength == 0, "unexpected username length\n" );
483 ok( uc.lpszPassword == NULL, "unexpected password\n" );
484 ok( uc.dwPasswordLength == 0, "unexpected password length\n" );
485 ok( uc.lpszHostName == url_k2 + 7, "unexpected hostname\n" );
486 ok( uc.dwHostNameLength == 14, "unexpected hostname length\n" );
487 ok( uc.nPort == 80, "unexpected port: %u\n", uc.nPort );
488 ok( uc.lpszUrlPath == url_k2 + 21, "unexpected path\n" );
489 ok( uc.dwUrlPathLength == 0, "unexpected path length\n" );
490 ok( uc.lpszExtraInfo == url_k2 + 21, "unexpected extra info\n" );
491 ok( uc.dwExtraInfoLength == 0, "unexpected extra info length\n" );
492
494 ret = WinHttpCrackUrl( url_k3, 0, 0, &uc );
495 ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
496 ok( uc.nScheme == INTERNET_SCHEME_HTTPS, "unexpected scheme\n" );
497 ok( uc.lpszScheme == url_k3, "unexpected scheme\n" );
498 ok( uc.dwSchemeLength == 5, "unexpected scheme length\n" );
499 ok( uc.lpszUserName == NULL, "unexpected username\n" );
500 ok( uc.dwUserNameLength == 0, "unexpected username length\n" );
501 ok( uc.lpszPassword == NULL, "unexpected password\n" );
502 ok( uc.dwPasswordLength == 0, "unexpected password length\n" );
503 ok( uc.lpszHostName == url_k3 + 8, "unexpected hostname\n" );
504 ok( uc.dwHostNameLength == 14, "unexpected hostname length\n" );
505 ok( uc.nPort == 443, "unexpected port: %u\n", uc.nPort );
506 ok( uc.lpszUrlPath == url_k3 + 22, "unexpected path\n" );
507 ok( uc.dwUrlPathLength == 5, "unexpected path length\n" );
508 ok( uc.lpszExtraInfo == url_k3 + 27, "unexpected extra info\n" );
509 ok( uc.dwExtraInfoLength == 1, "unexpected extra info length\n" );
510
511 /* bad parameters */
513 SetLastError( 0xdeadbeef );
514 ret = WinHttpCrackUrl( url_k4, 0, 0, &uc );
515 ok( !ret, "WinHttpCrackUrl succeeded\n" );
517 ok( error == ERROR_WINHTTP_INVALID_URL, "got %lu\n", error );
518
520 SetLastError( 0xdeadbeef );
521 ret = WinHttpCrackUrl( url_k5, 0, 0, &uc );
522 ok( !ret, "WinHttpCrackUrl succeeded\n" );
524 ok( error == ERROR_WINHTTP_INVALID_URL, "got %lu\n", error );
525
527 SetLastError( 0xdeadbeef );
528 ret = WinHttpCrackUrl( url_k6, 0, 0, &uc );
529 ok( !ret, "WinHttpCrackUrl succeeded\n" );
532
534 SetLastError( 0xdeadbeef );
535 ret = WinHttpCrackUrl( url_k7, 0, 0, &uc );
536 ok( !ret, "WinHttpCrackUrl succeeded\n" );
539
541 SetLastError( 0xdeadbeef );
542 ret = WinHttpCrackUrl( url_k8, 0, 0, &uc );
544 ok( !ret, "WinHttpCrackUrl succeeded\n" );
546
548 ret = WinHttpCrackUrl( url_k9, 0, 0, &uc );
549 ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
550 ok( uc.lpszUrlPath == url_k9 + 14 || broken(uc.lpszUrlPath == url_k9 + 13) /* win8 */,
551 "unexpected path: %s\n", wine_dbgstr_w(uc.lpszUrlPath) );
552 ok( uc.dwUrlPathLength == 0, "unexpected path length: %lu\n", uc.dwUrlPathLength );
553 ok( uc.lpszExtraInfo == url_k9 + 14 || broken(uc.lpszExtraInfo == url_k9 + 13) /* win8 */,
554 "unexpected extra info: %s\n", wine_dbgstr_w(uc.lpszExtraInfo) );
555 ok( uc.dwExtraInfoLength == 0 || broken(uc.dwExtraInfoLength == 1) /* win8 */,
556 "unexpected extra info length: %lu\n", uc.dwExtraInfoLength );
557
559 ret = WinHttpCrackUrl( url_k10, 0, 0, &uc );
560 ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
561 ok( uc.lpszUrlPath == url_k10 + 13, "unexpected path: %s\n", wine_dbgstr_w(uc.lpszUrlPath) );
562 ok( uc.dwUrlPathLength == 7, "unexpected path length: %lu\n", uc.dwUrlPathLength );
563 ok( uc.lpszExtraInfo == url_k10 + 20, "unexpected extra info: %s\n", wine_dbgstr_w(uc.lpszExtraInfo) );
564 ok( uc.dwExtraInfoLength == 0, "unexpected extra info length: %lu\n", uc.dwExtraInfoLength );
565
567 SetLastError( 0xdeadbeef );
568 ret = WinHttpCrackUrl( url4, 0, 0, &uc );
570 ok( !ret, "WinHttpCrackUrl succeeded\n" );
571 ok( error == ERROR_WINHTTP_INVALID_URL, "got %lu\n", error );
572
574 SetLastError( 0xdeadbeef );
575 ret = WinHttpCrackUrl( empty, 0, 0, &uc );
577 ok( !ret, "WinHttpCrackUrl succeeded\n" );
579
580 SetLastError( 0xdeadbeef );
581 ret = WinHttpCrackUrl( url1, 0, 0, NULL );
583 ok( !ret, "WinHttpCrackUrl succeeded\n" );
584 ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
585
586 SetLastError( 0xdeadbeef );
587 ret = WinHttpCrackUrl( NULL, 0, 0, &uc );
589 ok( !ret, "WinHttpCrackUrl succeeded\n" );
590 ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
591
592 /* decoding without buffers */
594 SetLastError(0xdeadbeef);
595 ret = WinHttpCrackUrl( url7, 0, ICU_DECODE, &uc );
597 ok( !ret, "WinHttpCrackUrl succeeded\n" );
598 ok( error == ERROR_INVALID_PARAMETER, "got %lu, expected ERROR_INVALID_PARAMETER\n", error );
599
600 /* decoding with buffers */
601 uc.lpszScheme = scheme;
602 uc.dwSchemeLength = 20;
603 uc.lpszUserName = user;
604 uc.dwUserNameLength = 20;
605 uc.lpszPassword = pass;
606 uc.dwPasswordLength = 20;
607 uc.lpszHostName = host;
608 uc.dwHostNameLength = 20;
609 uc.nPort = 0;
610 uc.lpszUrlPath = path;
611 uc.dwUrlPathLength = 80;
612 uc.lpszExtraInfo = extra;
613 uc.dwExtraInfoLength = 40;
614 path[0] = 0;
615
616 ret = WinHttpCrackUrl( url7, 0, ICU_DECODE, &uc );
617 ok( ret, "WinHttpCrackUrl failed %lu\n", GetLastError() );
618 ok( !memcmp( uc.lpszUrlPath + 11, escape, 21 * sizeof(WCHAR) ), "unexpected path\n" );
619 ok( uc.dwUrlPathLength == 32, "unexpected path length %lu\n", uc.dwUrlPathLength );
620 ok( !memcmp( uc.lpszExtraInfo, escape + 21, 12 * sizeof(WCHAR) ), "unexpected extra info\n" );
621 ok( uc.dwExtraInfoLength == 12, "unexpected extra info length %lu\n", uc.dwExtraInfoLength );
622
623 /* Urls with specified port numbers */
624 /* decoding with buffers */
625 uc.lpszScheme = scheme;
626 uc.dwSchemeLength = 20;
627 uc.lpszUserName = user;
628 uc.dwUserNameLength = 20;
629 uc.lpszPassword = pass;
630 uc.dwPasswordLength = 20;
631 uc.lpszHostName = host;
632 uc.dwHostNameLength = 20;
633 uc.nPort = 0;
634 uc.lpszUrlPath = path;
635 uc.dwUrlPathLength = 40;
636 uc.lpszExtraInfo = extra;
637 uc.dwExtraInfoLength = 20;
638 path[0] = 0;
639
640 ret = WinHttpCrackUrl( url6, 0, 0, &uc );
641 ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
642 ok( !memcmp( uc.lpszHostName, winehq, sizeof(winehq) ), "unexpected host name: %s\n", wine_dbgstr_w(uc.lpszHostName) );
643 ok( uc.dwHostNameLength == 14, "unexpected host name length: %lu\n", uc.dwHostNameLength );
644 ok( uc.nPort == 42, "unexpected port: %u\n", uc.nPort );
645
646 /* decoding without buffers */
648 ret = WinHttpCrackUrl( url8, 0, 0, &uc );
649 ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
650 ok( uc.nPort == 0, "unexpected port: %u\n", uc.nPort );
651
653 ret = WinHttpCrackUrl( url9, 0, 0, &uc );
654 ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
655 ok( uc.nPort == 80, "unexpected port: %u\n", uc.nPort );
656
658 ret = WinHttpCrackUrl( url10, 0, 0, &uc );
659 ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
660 ok( uc.nPort == 443, "unexpected port: %u\n", uc.nPort );
661
663 SetLastError( 0xdeadbeef );
664 ret = WinHttpCrackUrl( empty, 0, 0, &uc );
666 ok( !ret, "WinHttpCrackUrl succeeded\n" );
667 ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %lu, expected ERROR_WINHTTP_UNRECOGNIZED_SCHEME\n", error );
668
670 SetLastError( 0xdeadbeef );
671 ret = WinHttpCrackUrl( http, 0, 0, &uc );
673 ok( !ret, "WinHttpCrackUrl succeeded\n" );
674 ok( error == ERROR_WINHTTP_UNRECOGNIZED_SCHEME, "got %lu, expected ERROR_WINHTTP_UNRECOGNIZED_SCHEME\n", error );
675
677 ret = WinHttpCrackUrl( url11, 0, 0, &uc);
678 ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
679 ok( uc.nScheme == INTERNET_SCHEME_HTTP, "unexpected scheme\n" );
680 ok( uc.lpszScheme == url11,"unexpected scheme\n" );
681 ok( uc.dwSchemeLength == 4, "unexpected scheme length\n" );
682 ok( uc.lpszUserName == NULL, "unexpected username\n" );
683 ok( uc.lpszPassword == NULL, "unexpected password\n" );
684 ok( uc.lpszHostName == url11 + 7, "unexpected hostname\n" );
685 ok( uc.dwHostNameLength == 11, "unexpected hostname length\n" );
686 ok( uc.nPort == 80, "unexpected port: %u\n", uc.nPort );
687 ok( uc.lpszUrlPath == url11 + 18, "unexpected path\n" );
688 ok( uc.dwUrlPathLength == 5, "unexpected path length\n" );
689 ok( uc.lpszExtraInfo == url11 + 23, "unexpected extra info\n" );
690 ok( uc.dwExtraInfoLength == 39, "unexpected extra info length\n" );
691
692 uc.lpszScheme = scheme;
693 uc.dwSchemeLength = 20;
694 uc.lpszHostName = host;
695 uc.dwHostNameLength = 20;
696 uc.lpszUserName = NULL;
697 uc.dwUserNameLength = 0;
698 uc.lpszPassword = NULL;
699 uc.dwPasswordLength = 0;
700 uc.lpszUrlPath = path;
701 uc.dwUrlPathLength = 40;
702 uc.lpszExtraInfo = NULL;
703 uc.dwExtraInfoLength = 0;
704 uc.nPort = 0;
705 ret = WinHttpCrackUrl( url12, 0, ICU_DECODE, &uc );
706 ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
707
708 uc.lpszScheme = scheme;
709 uc.dwSchemeLength = 20;
710 uc.lpszHostName = host;
711 uc.dwHostNameLength = 20;
712 uc.lpszUserName = NULL;
713 uc.dwUserNameLength = 0;
714 uc.lpszPassword = NULL;
715 uc.dwPasswordLength = 0;
716 uc.lpszUrlPath = path;
717 uc.dwUrlPathLength = 40;
718 uc.lpszExtraInfo = NULL;
719 uc.dwExtraInfoLength = 0;
720 uc.nPort = 0;
722 ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
723 ok( !lstrcmpW( uc.lpszHostName, L"winehq.o g" ), "unexpected host name\n" );
724 ok( !lstrcmpW( uc.lpszUrlPath, L"/path%20with%20spaces" ), "unexpected path\n" );
725 ok( uc.dwUrlPathLength == lstrlenW(L"/path%20with%20spaces"), "got %lu\n", uc.dwUrlPathLength );
726
727 uc.dwStructSize = sizeof(uc);
728 uc.lpszScheme = NULL;
729 uc.dwSchemeLength = 0;
730 uc.nScheme = 0;
731 uc.lpszHostName = NULL;
732 uc.dwHostNameLength = ~0u;
733 uc.nPort = 0;
734 uc.lpszUserName = NULL;
735 uc.dwUserNameLength = ~0u;
736 uc.lpszPassword = NULL;
737 uc.dwPasswordLength = ~0u;
738 uc.lpszUrlPath = NULL;
739 uc.dwUrlPathLength = ~0u;
740 uc.lpszExtraInfo = NULL;
741 uc.dwExtraInfoLength = ~0u;
742 ret = WinHttpCrackUrl( url14, 0, 0, &uc );
743 ok( ret, "WinHttpCrackUrl failed le = %lu\n", GetLastError() );
744 ok( !uc.lpszScheme, "unexpected scheme %s\n", wine_dbgstr_w(uc.lpszScheme) );
745 ok( !uc.dwSchemeLength, "unexpected length %lu\n", uc.dwSchemeLength );
746 ok( uc.nScheme == INTERNET_SCHEME_HTTP, "unexpected scheme %u\n", uc.nScheme );
747 ok( !lstrcmpW( uc.lpszHostName, url14 + 7 ), "unexpected hostname %s\n", wine_dbgstr_w(uc.lpszHostName) );
748 ok( uc.dwHostNameLength == 14, "unexpected length %lu\n", uc.dwHostNameLength );
749 ok( uc.nPort == 80, "unexpected port %u\n", uc.nPort );
750 ok( !uc.lpszUserName, "unexpected username\n" );
751 ok( !uc.dwUserNameLength, "unexpected length %lu\n", uc.dwUserNameLength );
752 ok( !uc.lpszPassword, "unexpected password\n" );
753 ok( !uc.dwPasswordLength, "unexpected length %lu\n", uc.dwPasswordLength );
754 ok( !lstrcmpW( uc.lpszUrlPath, url14 + 21 ), "unexpected path %s\n", wine_dbgstr_w(uc.lpszUrlPath) );
755 ok( uc.dwUrlPathLength == 5, "unexpected length %lu\n", uc.dwUrlPathLength );
756 ok( !uc.lpszExtraInfo[0], "unexpected extra info %s\n", wine_dbgstr_w(uc.lpszExtraInfo) );
757 ok( uc.dwExtraInfoLength == 0, "unexpected length %lu\n", uc.dwExtraInfoLength );
758
759 uc.dwStructSize = sizeof(uc);
760 uc.lpszScheme = scheme;
761 uc.dwSchemeLength = 0;
762 uc.nScheme = 0;
763 uc.lpszHostName = NULL;
764 uc.dwHostNameLength = 0;
765 uc.nPort = 0;
766 uc.lpszUserName = NULL;
767 uc.dwUserNameLength = ~0u;
768 uc.lpszPassword = NULL;
769 uc.dwPasswordLength = ~0u;
770 uc.lpszUrlPath = NULL;
771 uc.dwUrlPathLength = 0;
772 uc.lpszExtraInfo = NULL;
773 uc.dwExtraInfoLength = 0;
774 SetLastError( 0xdeadbeef );
775 ret = WinHttpCrackUrl( url14, 0, 0, &uc );
777 ok( !ret, "WinHttpCrackUrl succeeded\n" );
778 ok( error == ERROR_INVALID_PARAMETER, "got %lu\n", error );
779 ok( !lstrcmpW( uc.lpszScheme, http ), "unexpected scheme %s\n", wine_dbgstr_w(uc.lpszScheme) );
780 ok( !uc.dwSchemeLength, "unexpected length %lu\n", uc.dwSchemeLength );
781 ok( uc.nScheme == 0, "unexpected scheme %u\n", uc.nScheme );
782 ok( !uc.lpszHostName, "unexpected hostname %s\n", wine_dbgstr_w(uc.lpszHostName) );
783 ok( uc.dwHostNameLength == 0, "unexpected length %lu\n", uc.dwHostNameLength );
784 ok( uc.nPort == 0, "unexpected port %u\n", uc.nPort );
785 ok( !uc.lpszUserName, "unexpected username\n" );
786 ok( uc.dwUserNameLength == ~0u, "unexpected length %lu\n", uc.dwUserNameLength );
787 ok( !uc.lpszPassword, "unexpected password\n" );
788 ok( uc.dwPasswordLength == ~0u, "unexpected length %lu\n", uc.dwPasswordLength );
789 ok( !uc.lpszUrlPath, "unexpected path %s\n", wine_dbgstr_w(uc.lpszUrlPath) );
790 ok( uc.dwUrlPathLength == 0, "unexpected length %lu\n", uc.dwUrlPathLength );
791 ok( !uc.lpszExtraInfo, "unexpected extra info %s\n", wine_dbgstr_w(uc.lpszExtraInfo) );
792 ok( uc.dwExtraInfoLength == 0, "unexpected length %lu\n", uc.dwExtraInfoLength );
793
795 SetLastError( 0xdeadbeef );
796 ret = WinHttpCrackUrl( url15, 0, 0, &uc );
798 ok( !ret, "WinHttpCrackUrl succeeded\n" );
799 ok( error == ERROR_WINHTTP_INVALID_URL, "got %lu\n", error );
800
802 uc.nPort = 1;
803 ret = WinHttpCrackUrl( url16, 0, 0, &uc );
804 ok( ret, "got %lu\n", GetLastError() );
805 ok( !uc.nPort, "got %u\n", uc.nPort );
806
808 uc.nPort = 1;
809 ret = WinHttpCrackUrl( url17, 0, 0, &uc );
810 ok( ret, "got %lu\n", GetLastError() );
811 ok( uc.nPort == 80, "got %u\n", uc.nPort );
812
814 uc.nPort = 1;
815 ret = WinHttpCrackUrl( url22, 0, 0, &uc );
816 ok( ret, "got %lu\n", GetLastError() );
817 ok( uc.nPort == 80, "got %u\n", uc.nPort );
818
819 memset( &uc, 0, sizeof(uc) );
820 uc.dwStructSize = sizeof(uc);
821 uc.lpszScheme = scheme;
823 uc.lpszHostName = host;
825 uc.lpszUrlPath = path;
827 ret = WinHttpCrackUrl( url21, 0, 0, &uc );
828 ok( ret, "got %lu\n", GetLastError() );
829 ok( !lstrcmpW( uc.lpszUrlPath, url21 + 37 ), "unexpected path %s\n", wine_dbgstr_w(uc.lpszUrlPath) );
830 ok( uc.dwUrlPathLength == 50, "unexpected length %lu\n", uc.dwUrlPathLength );
831}
832
834{
837}
#define ok(value,...)
Definition: atltest.h:57
#define broken(x)
Definition: atltest.h:178
#define START_TEST(x)
Definition: atltest.h:75
void user(int argc, const char *argv[])
Definition: cmds.c:1350
#define ARRAY_SIZE(A)
Definition: main.h:20
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define lstrlenW
Definition: compat.h:750
UINT WINAPI GetACP(void)
Definition: locale.c:2023
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4152
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2802
BOOL WINAPI WinHttpCreateUrl(URL_COMPONENTS *uc, DWORD flags, WCHAR *url, DWORD *required)
Definition: url.c:440
BOOL WINAPI WinHttpCrackUrl(const WCHAR *url, DWORD len, DWORD flags, URL_COMPONENTSW *uc)
Definition: url.c:173
return ret
Definition: mutex.c:146
#define L(x)
Definition: resources.c:13
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
@ extra
Definition: id3.c:95
#define wine_dbgstr_w
Definition: kernel32.h:34
#define error(str)
Definition: mkdosfs.c:1605
static const WCHAR url[]
Definition: encode.c:1384
const char * path
Definition: url.c:267
static const WCHAR url1[]
Definition: misc.c:300
static const WCHAR url2[]
Definition: misc.c:302
static WCHAR escape4[]
Definition: url.c:40
static const WCHAR url6[]
Definition: url.c:47
static const WCHAR url15[]
Definition: url.c:57
static void WinHttpCrackUrl_test(void)
Definition: url.c:394
static WCHAR empty[]
Definition: url.c:28
static const WCHAR url_k6[]
Definition: url.c:71
static void WinHttpCreateUrl_test(void)
Definition: url.c:96
static WCHAR query[]
Definition: url.c:35
static WCHAR http[]
Definition: url.c:30
static const WCHAR url5[]
Definition: url.c:46
static const WCHAR url_k2[]
Definition: url.c:67
static const WCHAR url4[]
Definition: url.c:45
static WCHAR ftp[]
Definition: url.c:29
static WCHAR escape3[]
Definition: url.c:39
static void reset_url_components(URL_COMPONENTS *uc)
Definition: url.c:381
static const WCHAR url_k10[]
Definition: url.c:75
static const WCHAR url8[]
Definition: url.c:50
static const WCHAR url14[]
Definition: url.c:56
static const WCHAR url_k4[]
Definition: url.c:69
static const WCHAR url_k8[]
Definition: url.c:73
static WCHAR escape[]
Definition: url.c:36
static const WCHAR url11[]
Definition: url.c:53
static WCHAR winehq[]
Definition: url.c:31
static const WCHAR url21[]
Definition: url.c:63
static const WCHAR url16[]
Definition: url.c:58
static const WCHAR url_k5[]
Definition: url.c:70
static const WCHAR url20[]
Definition: url.c:62
static void fill_url_components(URL_COMPONENTS *uc)
Definition: url.c:77
static WCHAR about[]
Definition: url.c:34
static const WCHAR url_k3[]
Definition: url.c:68
static const WCHAR url13[]
Definition: url.c:55
static const WCHAR url19[]
Definition: url.c:61
static WCHAR password[]
Definition: url.c:33
static const WCHAR url9[]
Definition: url.c:51
static const WCHAR url_k7[]
Definition: url.c:72
static const WCHAR url_k1[]
Definition: url.c:66
static WCHAR escape2[]
Definition: url.c:38
static const WCHAR url17[]
Definition: url.c:59
static const WCHAR url_k9[]
Definition: url.c:74
static const WCHAR url22[]
Definition: url.c:64
static WCHAR username[]
Definition: url.c:32
static const WCHAR url3[]
Definition: url.c:44
static const WCHAR url10[]
Definition: url.c:52
static const WCHAR url12[]
Definition: url.c:54
static const WCHAR url18[]
Definition: url.c:60
static const WCHAR url7[]
Definition: url.c:48
#define err(...)
DWORD scheme
#define CP_UTF8
Definition: nls.h:20
#define memset(x, y, z)
Definition: compat.h:39
DWORD dwStructSize
Definition: wininet.h:211
DWORD dwUrlPathLength
Definition: wininet.h:223
DWORD dwExtraInfoLength
Definition: wininet.h:225
LPWSTR lpszPassword
Definition: wininet.h:220
LPWSTR lpszHostName
Definition: wininet.h:215
DWORD dwUserNameLength
Definition: wininet.h:219
DWORD dwHostNameLength
Definition: wininet.h:216
INTERNET_SCHEME nScheme
Definition: wininet.h:214
LPWSTR lpszScheme
Definition: wininet.h:212
LPWSTR lpszUserName
Definition: wininet.h:218
LPWSTR lpszUrlPath
Definition: wininet.h:222
LPWSTR lpszExtraInfo
Definition: wininet.h:224
DWORD dwPasswordLength
Definition: wininet.h:221
INTERNET_PORT nPort
Definition: wininet.h:217
DWORD dwSchemeLength
Definition: wininet.h:213
INTERNET_PORT nPort
Definition: winhttp.h:543
LPWSTR lpszScheme
Definition: winhttp.h:538
LPWSTR lpszUserName
Definition: winhttp.h:544
LPWSTR lpszExtraInfo
Definition: winhttp.h:550
DWORD dwPasswordLength
Definition: winhttp.h:547
LPWSTR lpszUrlPath
Definition: winhttp.h:548
DWORD dwHostNameLength
Definition: winhttp.h:542
DWORD dwExtraInfoLength
Definition: winhttp.h:551
DWORD dwUrlPathLength
Definition: winhttp.h:549
LPWSTR lpszHostName
Definition: winhttp.h:541
LPWSTR lpszPassword
Definition: winhttp.h:546
INTERNET_SCHEME nScheme
Definition: winhttp.h:540
DWORD dwStructSize
Definition: winhttp.h:537
DWORD dwUserNameLength
Definition: winhttp.h:545
DWORD dwSchemeLength
Definition: winhttp.h:539
Definition: txthost.c:37
pass
Definition: typegen.h:25
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define ERROR_WINHTTP_INVALID_URL
Definition: winhttp.h:237
#define ICU_DECODE
Definition: winhttp.h:353
#define INTERNET_SCHEME_HTTP
Definition: winhttp.h:47
#define ERROR_WINHTTP_UNRECOGNIZED_SCHEME
Definition: winhttp.h:238
#define INTERNET_SCHEME_HTTPS
Definition: winhttp.h:48
#define ICU_ESCAPE
Definition: winhttp.h:53
__wchar_t WCHAR
Definition: xmlstorage.h:180