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
d6e624c7
Commit
d6e624c7
authored
Oct 10, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Nov 03, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Improved IUri support for file URIs.
parent
03efc237
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
2 deletions
+43
-2
uri.c
dlls/urlmon/tests/uri.c
+29
-0
uri.c
dlls/urlmon/uri.c
+14
-2
No files found.
dlls/urlmon/tests/uri.c
View file @
d6e624c7
...
...
@@ -4295,6 +4295,35 @@ static const uri_properties uri_tests[] = {
{
URL_SCHEME_MK
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
/* Two '\' are added to the URI when USE_DOS_PATH is set, and it's a UNC path. */
{
"file://server/dir/index.html"
,
Uri_CREATE_FILE_USE_DOS_PATH
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
Uri_HAS_EXTENSION
|
Uri_HAS_HOST
|
Uri_HAS_PATH
|
Uri_HAS_PATH_AND_QUERY
|
Uri_HAS_RAW_URI
|
Uri_HAS_SCHEME_NAME
|
Uri_HAS_HOST_TYPE
|
Uri_HAS_SCHEME
,
FALSE
,
{
{
"file://
\\\\
server
\\
dir
\\
index.html"
,
S_OK
,
FALSE
},
{
"server"
,
S_OK
,
FALSE
},
{
"file://
\\\\
server
\\
dir
\\
index.html"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
".html"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
"server"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
"
\\
dir
\\
index.html"
,
S_OK
,
FALSE
},
{
"
\\
dir
\\
index.html"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
"file://server/dir/index.html"
,
S_OK
,
FALSE
},
{
"file"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
}
},
{
{
Uri_HOST_DNS
,
S_OK
,
FALSE
},
{
0
,
S_FALSE
,
FALSE
},
{
URL_SCHEME_FILE
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
}
};
...
...
dlls/urlmon/uri.c
View file @
d6e624c7
...
...
@@ -2348,6 +2348,9 @@ static BOOL canonicalize_userinfo(const parse_data *data, Uri *uri, DWORD flags,
* it isn't an unknown scheme type.
*
* 4) If it's a file scheme and the host is "localhost" it's removed.
*
* 5) If it's a file scheme and Uri_CREATE_FILE_USE_DOS_PATH is set,
* then the UNC path characters are added before the host name.
*/
static
BOOL
canonicalize_reg_name
(
const
parse_data
*
data
,
Uri
*
uri
,
DWORD
flags
,
BOOL
computeOnly
)
{
...
...
@@ -2356,8 +2359,6 @@ static BOOL canonicalize_reg_name(const parse_data *data, Uri *uri,
const
WCHAR
*
ptr
;
const
BOOL
known_scheme
=
data
->
scheme_type
!=
URL_SCHEME_UNKNOWN
;
uri
->
host_start
=
uri
->
canon_len
;
if
(
data
->
scheme_type
==
URL_SCHEME_FILE
&&
data
->
host_len
==
lstrlenW
(
localhostW
))
{
if
(
!
StrCmpNIW
(
data
->
host
,
localhostW
,
data
->
host_len
))
{
...
...
@@ -2368,6 +2369,17 @@ static BOOL canonicalize_reg_name(const parse_data *data, Uri *uri,
}
}
if
(
data
->
scheme_type
==
URL_SCHEME_FILE
&&
flags
&
Uri_CREATE_FILE_USE_DOS_PATH
)
{
if
(
!
computeOnly
)
{
uri
->
canon_uri
[
uri
->
canon_len
]
=
'\\'
;
uri
->
canon_uri
[
uri
->
canon_len
+
1
]
=
'\\'
;
}
uri
->
canon_len
+=
2
;
uri
->
authority_start
=
uri
->
canon_len
;
}
uri
->
host_start
=
uri
->
canon_len
;
for
(
ptr
=
data
->
host
;
ptr
<
data
->
host
+
data
->
host_len
;
++
ptr
)
{
if
(
*
ptr
==
'%'
&&
known_scheme
)
{
WCHAR
val
=
decode_pct_val
(
ptr
);
...
...
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