Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
90b7ccc3
Commit
90b7ccc3
authored
Feb 15, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Feb 16, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: GetUrlPart can get the scheme of url's without a ://.
parent
f45b6486
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
url.c
dlls/shlwapi/tests/url.c
+7
-0
url.c
dlls/shlwapi/url.c
+2
-1
No files found.
dlls/shlwapi/tests/url.c
View file @
90b7ccc3
...
...
@@ -570,6 +570,7 @@ static void test_UrlGetPart(void)
{
const
char
*
file_url
=
"file://h o s t/c:/windows/file"
;
const
char
*
http_url
=
"http://user:pass 123@www.wine hq.org"
;
const
char
*
about_url
=
"about:blank"
;
CHAR
szPart
[
INTERNET_MAX_URL_LENGTH
];
DWORD
dwSize
;
...
...
@@ -607,6 +608,12 @@ static void test_UrlGetPart(void)
test_url_part
(
http_url
,
URL_PART_HOSTNAME
,
0
,
"www.wine hq.org"
);
test_url_part
(
http_url
,
URL_PART_PASSWORD
,
0
,
"pass 123"
);
test_url_part
(
about_url
,
URL_PART_SCHEME
,
0
,
"about"
);
dwSize
=
sizeof
(
szPart
);
res
=
pUrlGetPartA
(
about_url
,
szPart
,
&
dwSize
,
URL_PART_HOSTNAME
,
0
);
ok
(
res
==
E_FAIL
,
"returned %08x
\n
"
,
res
);
dwSize
=
sizeof
(
szPart
);
res
=
pUrlGetPartA
(
"file://c:
\\
index.htm"
,
szPart
,
&
dwSize
,
URL_PART_HOSTNAME
,
0
);
ok
(
res
==
S_FALSE
,
"returned %08x
\n
"
,
res
);
...
...
dlls/shlwapi/url.c
View file @
90b7ccc3
...
...
@@ -1938,7 +1938,7 @@ static LONG URL_ParseUrl(LPCWSTR pszUrl, WINE_PARSE_URL *pl)
work
=
URL_ScanID
(
pl
->
pScheme
,
&
pl
->
szScheme
,
SCHEME
);
if
(
!*
work
||
(
*
work
!=
':'
))
goto
ErrorExit
;
work
++
;
if
((
*
work
!=
'/'
)
||
(
*
(
work
+
1
)
!=
'/'
))
goto
Error
Exit
;
if
((
*
work
!=
'/'
)
||
(
*
(
work
+
1
)
!=
'/'
))
goto
Success
Exit
;
pl
->
pUserName
=
work
+
2
;
work
=
URL_ScanID
(
pl
->
pUserName
,
&
pl
->
szUserName
,
USERPASS
);
if
(
*
work
==
':'
)
{
...
...
@@ -1979,6 +1979,7 @@ static LONG URL_ParseUrl(LPCWSTR pszUrl, WINE_PARSE_URL *pl)
pl
->
pQuery
=
strchrW
(
work
,
'?'
);
if
(
pl
->
pQuery
)
pl
->
szQuery
=
strlenW
(
pl
->
pQuery
);
}
SuccessExit:
TRACE
(
"parse successful: scheme=%p(%d), user=%p(%d), pass=%p(%d), host=%p(%d), port=%p(%d), query=%p(%d)
\n
"
,
pl
->
pScheme
,
pl
->
szScheme
,
pl
->
pUserName
,
pl
->
szUserName
,
...
...
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