Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bcdb10a9
Commit
bcdb10a9
authored
Jun 23, 2008
by
Dan Kegel
Committed by
Alexandre Julliard
Jun 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: InternetCrackUrlW: For URLs that have no urlpath, native clears lpszUrlPath.
parent
0097275f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
internet.c
dlls/wininet/internet.c
+2
-0
url.c
dlls/wininet/tests/url.c
+27
-0
No files found.
dlls/wininet/internet.c
View file @
bcdb10a9
...
@@ -1490,6 +1490,8 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR
...
@@ -1490,6 +1490,8 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR
}
}
else
else
{
{
if
(
lpUC
->
lpszUrlPath
&&
(
lpUC
->
dwUrlPathLength
>
0
))
lpUC
->
lpszUrlPath
[
0
]
=
0
;
lpUC
->
dwUrlPathLength
=
0
;
lpUC
->
dwUrlPathLength
=
0
;
}
}
...
...
dlls/wininet/tests/url.c
View file @
bcdb10a9
...
@@ -268,6 +268,7 @@ static void InternetCrackUrlW_test(void)
...
@@ -268,6 +268,7 @@ static void InternetCrackUrlW_test(void)
'='
,
'I'
,
'D'
,
'E'
,
'&'
,
'A'
,
'C'
,
'T'
,
'I'
,
'O'
,
'N'
,
'='
,
'I'
,
'D'
,
'E'
,
'_'
,
'D'
,
'E'
,
'F'
,
'A'
,
'='
,
'I'
,
'D'
,
'E'
,
'&'
,
'A'
,
'C'
,
'T'
,
'I'
,
'O'
,
'N'
,
'='
,
'I'
,
'D'
,
'E'
,
'_'
,
'D'
,
'E'
,
'F'
,
'A'
,
'U'
,
'L'
,
'T'
,
0
};
'U'
,
'L'
,
'T'
,
0
};
static
const
WCHAR
url2
[]
=
{
'.'
,
'.'
,
'/'
,
'R'
,
'i'
,
't'
,
'z'
,
'.'
,
'x'
,
'm'
,
'l'
,
0
};
static
const
WCHAR
url2
[]
=
{
'.'
,
'.'
,
'/'
,
'R'
,
'i'
,
't'
,
'z'
,
'.'
,
'x'
,
'm'
,
'l'
,
0
};
static
const
WCHAR
url3
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'x'
,
'.'
,
'o'
,
'r'
,
'g'
,
0
};
URL_COMPONENTSW
comp
;
URL_COMPONENTSW
comp
;
WCHAR
scheme
[
20
],
host
[
20
],
user
[
20
],
pwd
[
20
],
urlpart
[
50
],
extra
[
50
];
WCHAR
scheme
[
20
],
host
[
20
],
user
[
20
],
pwd
[
20
],
urlpart
[
50
],
extra
[
50
];
DWORD
error
;
DWORD
error
;
...
@@ -389,6 +390,32 @@ static void InternetCrackUrlW_test(void)
...
@@ -389,6 +390,32 @@ static void InternetCrackUrlW_test(void)
"InternetCrackUrl should have failed with error ERROR_INTERNET_UNRECOGNIZED_SCHEME instead of error %d
\n
"
,
"InternetCrackUrl should have failed with error ERROR_INTERNET_UNRECOGNIZED_SCHEME instead of error %d
\n
"
,
GetLastError
());
GetLastError
());
}
}
/* Test to see whether cracking a URL without a filename initializes urlpart */
urlpart
[
0
]
=
0xba
;
scheme
[
0
]
=
0
;
extra
[
0
]
=
0
;
host
[
0
]
=
0
;
user
[
0
]
=
0
;
pwd
[
0
]
=
0
;
memset
(
&
comp
,
0
,
sizeof
comp
);
comp
.
dwStructSize
=
sizeof
comp
;
comp
.
lpszScheme
=
scheme
;
comp
.
dwSchemeLength
=
sizeof
scheme
;
comp
.
lpszHostName
=
host
;
comp
.
dwHostNameLength
=
sizeof
host
;
comp
.
lpszUserName
=
user
;
comp
.
dwUserNameLength
=
sizeof
user
;
comp
.
lpszPassword
=
pwd
;
comp
.
dwPasswordLength
=
sizeof
pwd
;
comp
.
lpszUrlPath
=
urlpart
;
comp
.
dwUrlPathLength
=
sizeof
urlpart
;
comp
.
lpszExtraInfo
=
extra
;
comp
.
dwExtraInfoLength
=
sizeof
extra
;
r
=
InternetCrackUrlW
(
url3
,
0
,
0
,
&
comp
);
ok
(
r
,
"InternetCrackUrlW failed unexpectedly
\n
"
);
ok
(
host
[
0
]
==
'x'
,
"host should be x.org
\n
"
);
ok
(
urlpart
[
0
]
==
0
,
"urlpart should be empty
\n
"
);
}
}
static
void
fill_url_components
(
LPURL_COMPONENTS
lpUrlComponents
)
static
void
fill_url_components
(
LPURL_COMPONENTS
lpUrlComponents
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment