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
9eb140db
Commit
9eb140db
authored
Mar 27, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Fix handling of mailto URIs in CoInternetCombineUrlEx.
parent
873efd46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
119 additions
and
9 deletions
+119
-9
uri.c
dlls/urlmon/tests/uri.c
+109
-6
uri.c
dlls/urlmon/uri.c
+10
-3
No files found.
dlls/urlmon/tests/uri.c
View file @
9eb140db
...
...
@@ -4521,7 +4521,57 @@ static const uri_properties uri_tests[] = {
{
URL_SCHEME_UNKNOWN
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
}
},
{
"mailto://"
,
Uri_CREATE_NO_CANONICALIZE
,
S_OK
,
FALSE
,
{
{
"mailto:"
,
S_OK
},
{
""
,
S_FALSE
},
{
"mailto:"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
"mailto://"
,
S_OK
,
FALSE
,
"mailto:"
},
{
"mailto"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
}
},
{
{
Uri_HOST_UNKNOWN
,
S_OK
},
{
0
,
S_FALSE
},
{
URL_SCHEME_MAILTO
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
},
{
"mailto://a@b.com"
,
Uri_CREATE_NO_CANONICALIZE
,
S_OK
,
FALSE
,
{
{
"mailto:a@b.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
"mailto:a@b.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
".com"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
"a@b.com"
,
S_OK
},
{
"a@b.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
"mailto://a@b.com"
,
S_OK
,
FALSE
,
"mailto:a@b.com"
},
{
"mailto"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
}
},
{
{
Uri_HOST_UNKNOWN
,
S_OK
},
{
0
,
S_FALSE
},
{
URL_SCHEME_MAILTO
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
}
};
typedef
struct
_invalid_uri
{
...
...
@@ -7005,8 +7055,61 @@ static const uri_combine_test uri_combine_tests[] = {
{
URL_SCHEME_FILE
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
},
{
"http://winehq.org"
,
0
,
"mailto://"
,
Uri_CREATE_NO_CANONICALIZE
,
0
,
S_OK
,
FALSE
,
{
{
"mailto:"
,
S_OK
},
{
""
,
S_FALSE
},
{
"mailto:"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
"mailto://"
,
S_OK
,
FALSE
,
"mailto:"
},
{
"mailto"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
}
},
{
{
Uri_HOST_UNKNOWN
,
S_OK
},
{
0
,
S_FALSE
},
{
URL_SCHEME_MAILTO
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
},
{
"http://winehq.org"
,
0
,
"mailto://a@b.com"
,
Uri_CREATE_NO_CANONICALIZE
,
0
,
S_OK
,
FALSE
,
{
{
"mailto:a@b.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
"mailto:a@b.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
".com"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
},
{
"a@b.com"
,
S_OK
},
{
"a@b.com"
,
S_OK
},
{
""
,
S_FALSE
},
{
"mailto://a@b.com"
,
S_OK
,
FALSE
,
"mailto:a@b.com"
},
{
"mailto"
,
S_OK
},
{
""
,
S_FALSE
},
{
""
,
S_FALSE
}
},
{
{
Uri_HOST_UNKNOWN
,
S_OK
},
{
0
,
S_FALSE
},
{
URL_SCHEME_MAILTO
,
S_OK
},
{
URLZONE_INVALID
,
E_NOTIMPL
}
}
}
};
typedef
struct
_uri_parse_test
{
...
...
@@ -10317,7 +10420,7 @@ static void test_CoInternetCombineIUri(void) {
todo_wine
{
ok
(
!
strcmp_aw
(
prop
.
value
,
received
)
||
broken
(
prop
.
broken_value
&&
!
strcmp_aw
(
prop
.
broken_value
,
received
)),
"Error: Expected
%s
but got %s instead on uri_combine_tests[%d].str_props[%d].
\n
"
,
"Error: Expected
\"
%s
\"
but got %s instead on uri_combine_tests[%d].str_props[%d].
\n
"
,
prop
.
value
,
wine_dbgstr_w
(
received
),
i
,
j
);
}
}
else
{
...
...
@@ -10326,7 +10429,7 @@ static void test_CoInternetCombineIUri(void) {
hr
,
prop
.
expected
,
i
,
j
);
ok
(
!
strcmp_aw
(
prop
.
value
,
received
)
||
broken
(
prop
.
broken_value
&&
!
strcmp_aw
(
prop
.
broken_value
,
received
)),
"Error: Expected
%s
but got %s instead on uri_combine_tests[%d].str_props[%d].
\n
"
,
"Error: Expected
\"
%s
\"
but got %s instead on uri_combine_tests[%d].str_props[%d].
\n
"
,
prop
.
value
,
wine_dbgstr_w
(
received
),
i
,
j
);
}
SysFreeString
(
received
);
...
...
@@ -10634,7 +10737,7 @@ static void test_CoInternetCombineUrlEx(void) {
todo_wine
{
ok
(
!
strcmp_aw
(
value
,
received
)
||
broken
(
prop
.
broken_value
&&
!
strcmp_aw
(
prop
.
broken_value
,
received
)),
"Error: Expected
%s
but got %s instead on uri_combine_tests[%d].str_props[%d].
\n
"
,
"Error: Expected
\"
%s
\"
but got %s instead on uri_combine_tests[%d].str_props[%d].
\n
"
,
value
,
wine_dbgstr_w
(
received
),
i
,
j
);
}
}
else
{
...
...
@@ -10643,7 +10746,7 @@ static void test_CoInternetCombineUrlEx(void) {
hr
,
prop
.
expected
,
i
,
j
);
ok
(
!
strcmp_aw
(
value
,
received
)
||
broken
(
prop
.
broken_value
&&
!
strcmp_aw
(
prop
.
broken_value
,
received
)),
"Error: Expected
%s
but got %s instead on uri_combine_tests[%d].str_props[%d].
\n
"
,
"Error: Expected
\"
%s
\"
but got %s instead on uri_combine_tests[%d].str_props[%d].
\n
"
,
value
,
wine_dbgstr_w
(
received
),
i
,
j
);
}
SysFreeString
(
received
);
...
...
dlls/urlmon/uri.c
View file @
9eb140db
...
...
@@ -422,7 +422,7 @@ static inline BOOL is_hierarchical_uri(const WCHAR **ptr, const parse_data *data
else
if
(
is_hierarchical_scheme
(
data
->
scheme_type
)
&&
(
*
ptr
)[
0
]
==
'\\'
&&
(
*
ptr
)[
1
]
==
'\\'
)
{
*
ptr
+=
2
;
return
TRUE
;
}
else
if
(
check_hierarchical
(
ptr
))
}
else
if
(
data
->
scheme_type
!=
URL_SCHEME_MAILTO
&&
check_hierarchical
(
ptr
))
return
TRUE
;
*
ptr
=
start
;
...
...
@@ -1917,8 +1917,15 @@ static BOOL parse_path_hierarchical(const WCHAR **ptr, parse_data *data, DWORD f
static
BOOL
parse_path_opaque
(
const
WCHAR
**
ptr
,
parse_data
*
data
,
DWORD
flags
)
{
const
BOOL
known_scheme
=
data
->
scheme_type
!=
URL_SCHEME_UNKNOWN
;
const
BOOL
is_file
=
data
->
scheme_type
==
URL_SCHEME_FILE
;
const
BOOL
is_mailto
=
data
->
scheme_type
==
URL_SCHEME_MAILTO
;
data
->
path
=
*
ptr
;
if
(
is_mailto
&&
(
*
ptr
)[
0
]
==
'/'
&&
(
*
ptr
)[
1
]
==
'/'
)
{
if
((
*
ptr
)[
2
])
data
->
path
=
*
ptr
+
2
;
else
data
->
path
=
NULL
;
}
else
data
->
path
=
*
ptr
;
while
(
!
is_path_delim
(
**
ptr
))
{
if
(
**
ptr
==
'%'
&&
known_scheme
)
{
...
...
@@ -1938,7 +1945,7 @@ static BOOL parse_path_opaque(const WCHAR **ptr, parse_data *data, DWORD flags)
++
(
*
ptr
);
}
data
->
path_len
=
*
ptr
-
data
->
path
;
if
(
data
->
path
)
data
->
path_len
=
*
ptr
-
data
->
path
;
TRACE
(
"(%p %p %x): Parsed opaque URI path %s len=%d
\n
"
,
ptr
,
data
,
flags
,
debugstr_wn
(
data
->
path
,
data
->
path_len
),
data
->
path_len
);
return
TRUE
;
...
...
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