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
7b4d59c5
Commit
7b4d59c5
authored
Dec 26, 2005
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 26, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: URL with two slashes is valid.
parent
0334ba93
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
file.c
dlls/urlmon/file.c
+4
-2
protocol.c
dlls/urlmon/tests/protocol.c
+13
-1
No files found.
dlls/urlmon/file.c
View file @
7b4d59c5
...
...
@@ -145,8 +145,10 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
IInternetProtocolSink_ReportProgress
(
pOIProtSink
,
BINDSTATUS_SENDINGREQUEST
,
&
null_char
);
file_name
=
url
+
sizeof
(
wszFile
)
/
sizeof
(
WCHAR
);
if
(
file_name
[
0
]
==
'/'
&&
file_name
[
1
]
==
'/'
&&
file_name
[
2
]
==
'/'
)
file_name
+=
3
;
if
(
file_name
[
0
]
==
'/'
&&
file_name
[
1
]
==
'/'
)
file_name
+=
2
;
if
(
*
file_name
==
'/'
)
file_name
++
;
This
->
file
=
CreateFileW
(
file_name
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
...
...
dlls/urlmon/tests/protocol.c
View file @
7b4d59c5
...
...
@@ -452,7 +452,8 @@ static void test_file_protocol(void) {
HANDLE
file
;
static
const
WCHAR
wszFile
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
0
};
static
const
WCHAR
wszFile2
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
'/'
,
'/'
,
'/'
,
0
};
static
const
WCHAR
wszFile2
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
'/'
,
'/'
,
0
};
static
const
WCHAR
wszFile3
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
,
'/'
,
'/'
,
'/'
,
0
};
static
const
char
html_doc
[]
=
"<HTML></HTML>"
;
file
=
CreateFileW
(
wszIndexHtml
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
...
...
@@ -488,7 +489,18 @@ static void test_file_protocol(void) {
memcpy
(
buf
+
len
,
wszIndexHtml
,
sizeof
(
wszIndexHtml
));
file_name
=
buf
+
sizeof
(
wszFile2
)
/
sizeof
(
WCHAR
)
-
1
;
bindf
=
0
;
test_file_protocol_url
(
buf
);
bindf
=
BINDF_FROMURLMON
;
test_file_protocol_url
(
buf
);
memcpy
(
buf
,
wszFile3
,
sizeof
(
wszFile3
));
len
=
sizeof
(
wszFile3
)
/
sizeof
(
WCHAR
)
-
1
;
len
+=
GetCurrentDirectoryW
(
sizeof
(
buf
)
/
sizeof
(
WCHAR
)
-
len
,
buf
+
len
);
buf
[
len
++
]
=
'\\'
;
memcpy
(
buf
+
len
,
wszIndexHtml
,
sizeof
(
wszIndexHtml
));
file_name
=
buf
+
sizeof
(
wszFile3
)
/
sizeof
(
WCHAR
)
-
1
;
bindf
=
0
;
test_file_protocol_url
(
buf
);
bindf
=
BINDF_FROMURLMON
;
...
...
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