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
5b76702e
Commit
5b76702e
authored
Dec 09, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Set lpszUrlPath in InternetCrackUrlW if its length is 0.
parent
d153344e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
internet.c
dlls/wininet/internet.c
+1
-1
url.c
dlls/wininet/tests/url.c
+12
-5
No files found.
dlls/wininet/internet.c
View file @
5b76702e
...
...
@@ -1603,7 +1603,7 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR
* <protocol>:[//<net_loc>][/path][;<params>][?<query>][#<fragment>]
* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
*/
if
(
lpszcp
!=
0
&&
lpszcp
-
lpszUrl
<
dwUrlLength
&&
(
!
lpszParam
||
lpszcp
<
lpszParam
))
if
(
lpszcp
!=
0
&&
lpszcp
-
lpszUrl
<
dwUrlLength
&&
(
!
lpszParam
||
lpszcp
<
=
lpszParam
))
{
INT
len
;
...
...
dlls/wininet/tests/url.c
View file @
5b76702e
...
...
@@ -94,6 +94,7 @@ typedef struct {
INTERNET_SCHEME
scheme
;
int
host_off
;
int
host_len
;
int
host_skip_broken
;
INTERNET_PORT
port
;
int
user_off
;
int
user_len
;
...
...
@@ -107,15 +108,17 @@ typedef struct {
static
const
crack_url_test_t
crack_url_tests
[]
=
{
{
"http://www.winehq.org/site/about#hi"
,
0
,
4
,
INTERNET_SCHEME_HTTP
,
7
,
14
,
80
,
-
1
,
0
,
-
1
,
0
,
21
,
11
,
32
,
3
},
0
,
4
,
INTERNET_SCHEME_HTTP
,
7
,
14
,
-
1
,
80
,
-
1
,
0
,
-
1
,
0
,
21
,
11
,
32
,
3
},
{
"http://www.myserver.com/myscript.php?arg=1"
,
0
,
4
,
INTERNET_SCHEME_HTTP
,
7
,
16
,
80
,
-
1
,
0
,
-
1
,
0
,
23
,
13
,
36
,
6
},
0
,
4
,
INTERNET_SCHEME_HTTP
,
7
,
16
,
-
1
,
80
,
-
1
,
0
,
-
1
,
0
,
23
,
13
,
36
,
6
},
{
"http://www.winehq.org?test=123"
,
0
,
4
,
INTERNET_SCHEME_HTTP
,
7
,
14
,
23
,
80
,
-
1
,
0
,
-
1
,
0
,
21
,
0
,
21
,
9
},
{
"file:///C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml"
,
0
,
4
,
INTERNET_SCHEME_FILE
,
-
1
,
0
,
0
,
-
1
,
0
,
-
1
,
0
,
7
,
55
,
-
1
,
0
},
0
,
4
,
INTERNET_SCHEME_FILE
,
-
1
,
0
,
-
1
,
0
,
-
1
,
0
,
-
1
,
0
,
7
,
55
,
-
1
,
0
},
{
"fide:///C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml"
,
0
,
4
,
INTERNET_SCHEME_UNKNOWN
,
7
,
0
,
0
,
-
1
,
0
,
-
1
,
0
,
7
,
55
,
-
1
,
0
},
0
,
4
,
INTERNET_SCHEME_UNKNOWN
,
7
,
0
,
-
1
,
0
,
-
1
,
0
,
-
1
,
0
,
7
,
55
,
-
1
,
0
},
{
"file://C:/Program%20Files/Atmel/AVR%20Tools/STK500/STK500.xml"
,
0
,
4
,
INTERNET_SCHEME_FILE
,
-
1
,
0
,
0
,
-
1
,
0
,
-
1
,
0
,
7
,
54
,
-
1
,
0
},
0
,
4
,
INTERNET_SCHEME_FILE
,
-
1
,
0
,
-
1
,
0
,
-
1
,
0
,
-
1
,
0
,
7
,
54
,
-
1
,
0
},
};
static
void
test_crack_url
(
const
crack_url_test_t
*
test
)
...
...
@@ -143,6 +146,10 @@ static void test_crack_url(const crack_url_test_t *test)
else
ok
(
url
.
lpszHostName
==
test
->
url
+
test
->
host_off
,
"[%s] url.lpszHostName = %p, expected %p
\n
"
,
test
->
url
,
url
.
lpszHostName
,
test
->
url
+
test
->
host_off
);
if
(
test
->
host_skip_broken
!=
-
1
&&
url
.
dwHostNameLength
==
test
->
host_skip_broken
)
{
win_skip
(
"skipping broken dwHostNameLength result
\n
"
);
return
;
}
ok
(
url
.
dwHostNameLength
==
test
->
host_len
,
"[%s] url.lpszHostNameLength = %d, expected %d
\n
"
,
test
->
url
,
url
.
dwHostNameLength
,
test
->
host_len
);
...
...
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