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
73452e90
Commit
73452e90
authored
Feb 10, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
itss: Fix handling URLs without '/' in object name.
parent
5bc1a8de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
protocol.c
dlls/itss/protocol.c
+8
-1
protocol.c
dlls/itss/tests/protocol.c
+3
-0
No files found.
dlls/itss/protocol.c
View file @
73452e90
...
@@ -180,13 +180,20 @@ static HRESULT WINAPI ITSProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
...
@@ -180,13 +180,20 @@ static HRESULT WINAPI ITSProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
object_name
+=
2
;
object_name
+=
2
;
memset
(
&
chm_object
,
0
,
sizeof
(
chm_object
));
memset
(
&
chm_object
,
0
,
sizeof
(
chm_object
));
res
=
chm_resolve_object
(
chm_file
,
object_name
,
&
chm_object
);
res
=
chm_resolve_object
(
chm_file
,
object_name
,
&
chm_object
);
if
(
res
!=
CHM_RESOLVE_SUCCESS
&&
object_name
[
0
]
!=
'/'
)
{
WCHAR
tmp_obj_name
[
MAX_PATH
];
tmp_obj_name
[
0
]
=
'/'
;
strcpyW
(
tmp_obj_name
+
1
,
object_name
);
res
=
chm_resolve_object
(
chm_file
,
tmp_obj_name
,
&
chm_object
);
}
if
(
res
!=
CHM_RESOLVE_SUCCESS
)
{
if
(
res
!=
CHM_RESOLVE_SUCCESS
)
{
WARN
(
"Could not resolve chm object
\n
"
);
WARN
(
"Could not resolve chm object
\n
"
);
chm_close
(
chm_file
);
chm_close
(
chm_file
);
return
report_result
(
pOIProtSink
,
STG_E_FILENOTFOUND
);
return
report_result
(
pOIProtSink
,
STG_E_FILENOTFOUND
);
}
}
IInternetProtocolSink_ReportProgress
(
pOIProtSink
,
BINDSTATUS_SENDINGREQUEST
,
object_name
+
1
);
IInternetProtocolSink_ReportProgress
(
pOIProtSink
,
BINDSTATUS_SENDINGREQUEST
,
object_name
[
0
]
==
'/'
?
object_name
+
1
:
object_name
);
/* FIXME: Native doesn't use FindMimeFromData */
/* FIXME: Native doesn't use FindMimeFromData */
hres
=
FindMimeFromData
(
NULL
,
szUrl
,
NULL
,
0
,
NULL
,
0
,
&
mime
,
0
);
hres
=
FindMimeFromData
(
NULL
,
szUrl
,
NULL
,
0
,
NULL
,
0
,
&
mime
,
0
);
...
...
dlls/itss/tests/protocol.c
View file @
73452e90
...
@@ -402,6 +402,8 @@ static void test_its_protocol(void)
...
@@ -402,6 +402,8 @@ static void test_its_protocol(void)
't'
,
'e'
,
's'
,
't'
,
'.'
,
'c'
,
'h'
,
'm'
,
':'
,
':'
,
'/'
,
'b'
,
'l'
,
'a'
,
'n'
,
'k'
,
'.'
,
'h'
,
't'
,
'm'
,
'l'
,
0
};
't'
,
'e'
,
's'
,
't'
,
'.'
,
'c'
,
'h'
,
'm'
,
':'
,
':'
,
'/'
,
'b'
,
'l'
,
'a'
,
'n'
,
'k'
,
'.'
,
'h'
,
't'
,
'm'
,
'l'
,
0
};
static
const
WCHAR
blank_url3
[]
=
{
'm'
,
'k'
,
':'
,
'@'
,
'M'
,
'S'
,
'I'
,
'T'
,
'S'
,
't'
,
'o'
,
'r'
,
'e'
,
':'
,
static
const
WCHAR
blank_url3
[]
=
{
'm'
,
'k'
,
':'
,
'@'
,
'M'
,
'S'
,
'I'
,
'T'
,
'S'
,
't'
,
'o'
,
'r'
,
'e'
,
':'
,
't'
,
'e'
,
's'
,
't'
,
'.'
,
'c'
,
'h'
,
'm'
,
':'
,
':'
,
'/'
,
'b'
,
'l'
,
'a'
,
'n'
,
'k'
,
'.'
,
'h'
,
't'
,
'm'
,
'l'
,
0
};
't'
,
'e'
,
's'
,
't'
,
'.'
,
'c'
,
'h'
,
'm'
,
':'
,
':'
,
'/'
,
'b'
,
'l'
,
'a'
,
'n'
,
'k'
,
'.'
,
'h'
,
't'
,
'm'
,
'l'
,
0
};
static
const
WCHAR
blank_url4
[]
=
{
'i'
,
't'
,
's'
,
':'
,
't'
,
'e'
,
's'
,
't'
,
'.'
,
'c'
,
'h'
,
'm'
,
':'
,
':'
,
'b'
,
'l'
,
'a'
,
'n'
,
'k'
,
'.'
,
'h'
,
't'
,
'm'
,
'l'
,
0
};
static
const
WCHAR
wrong_url1
[]
=
static
const
WCHAR
wrong_url1
[]
=
{
'i'
,
't'
,
's'
,
':'
,
't'
,
'e'
,
's'
,
't'
,
'.'
,
'c'
,
'h'
,
'm'
,
':'
,
':'
,
'/'
,
'b'
,
'l'
,
'a'
,
'n'
,
'.'
,
'h'
,
't'
,
'm'
,
'l'
,
0
};
{
'i'
,
't'
,
's'
,
':'
,
't'
,
'e'
,
's'
,
't'
,
'.'
,
'c'
,
'h'
,
'm'
,
':'
,
':'
,
'/'
,
'b'
,
'l'
,
'a'
,
'n'
,
'.'
,
'h'
,
't'
,
'm'
,
'l'
,
0
};
static
const
WCHAR
wrong_url2
[]
=
static
const
WCHAR
wrong_url2
[]
=
...
@@ -446,6 +448,7 @@ static void test_its_protocol(void)
...
@@ -446,6 +448,7 @@ static void test_its_protocol(void)
test_protocol_url
(
factory
,
blank_url1
);
test_protocol_url
(
factory
,
blank_url1
);
test_protocol_url
(
factory
,
blank_url2
);
test_protocol_url
(
factory
,
blank_url2
);
test_protocol_url
(
factory
,
blank_url3
);
test_protocol_url
(
factory
,
blank_url3
);
test_protocol_url
(
factory
,
blank_url4
);
}
}
IClassFactory_Release
(
factory
);
IClassFactory_Release
(
factory
);
...
...
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