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
f0e5fa46
Commit
f0e5fa46
authored
Mar 09, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 09, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added text/xml filter.
parent
6cb3713e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
urlmon_main.c
dlls/urlmon/urlmon_main.c
+21
-2
No files found.
dlls/urlmon/urlmon_main.c
View file @
f0e5fa46
...
...
@@ -637,8 +637,7 @@ static BOOL text_html_filter(const BYTE *b, DWORD size)
&&
(
b
[
i
+
2
]
==
't'
||
b
[
i
+
2
]
==
'T'
)
&&
(
b
[
i
+
3
]
==
'm'
||
b
[
i
+
3
]
==
'M'
)
&&
(
b
[
i
+
4
]
==
'l'
||
b
[
i
+
4
]
==
'L'
))
||
((
size
-
i
>=
6
)
&&
b
[
i
]
==
'<'
(
b
[
i
]
==
'<'
&&
(
b
[
i
+
1
]
==
'h'
||
b
[
i
+
1
]
==
'H'
)
&&
(
b
[
i
+
2
]
==
'e'
||
b
[
i
+
2
]
==
'E'
)
&&
(
b
[
i
+
3
]
==
'a'
||
b
[
i
+
3
]
==
'A'
)
...
...
@@ -649,6 +648,24 @@ static BOOL text_html_filter(const BYTE *b, DWORD size)
return
FALSE
;
}
static
BOOL
text_xml_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
DWORD
i
;
if
(
size
<
6
)
return
FALSE
;
for
(
i
=
0
;
i
<
size
-
6
;
i
++
)
{
if
(
b
[
i
]
==
'<'
&&
b
[
i
+
1
]
==
'?'
&&
(
b
[
i
+
2
]
==
'x'
||
b
[
i
+
2
]
==
'X'
)
&&
(
b
[
i
+
3
]
==
'm'
||
b
[
i
+
3
]
==
'M'
)
&&
(
b
[
i
+
4
]
==
'l'
||
b
[
i
+
4
]
==
'L'
)
&&
b
[
i
+
5
]
==
' '
)
return
TRUE
;
}
return
FALSE
;
}
static
BOOL
audio_basic_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
4
...
...
@@ -767,6 +784,7 @@ static HRESULT find_mime_from_buffer(const BYTE *buf, DWORD size, const WCHAR *p
static
const
WCHAR
text_htmlW
[]
=
{
't'
,
'e'
,
'x'
,
't'
,
'/'
,
'h'
,
't'
,
'm'
,
'l'
,
0
};
static
const
WCHAR
text_richtextW
[]
=
{
't'
,
'e'
,
'x'
,
't'
,
'/'
,
'r'
,
'i'
,
'c'
,
'h'
,
't'
,
'e'
,
'x'
,
't'
,
0
};
static
const
WCHAR
text_xmlW
[]
=
{
't'
,
'e'
,
'x'
,
't'
,
'/'
,
'x'
,
'm'
,
'l'
,
0
};
static
const
WCHAR
audio_basicW
[]
=
{
'a'
,
'u'
,
'd'
,
'i'
,
'o'
,
'/'
,
'b'
,
'a'
,
's'
,
'i'
,
'c'
,
0
};
static
const
WCHAR
audio_wavW
[]
=
{
'a'
,
'u'
,
'd'
,
'i'
,
'o'
,
'/'
,
'w'
,
'a'
,
'v'
,
0
};
static
const
WCHAR
image_gifW
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
'g'
,
'i'
,
'f'
,
0
};
...
...
@@ -796,6 +814,7 @@ static HRESULT find_mime_from_buffer(const BYTE *buf, DWORD size, const WCHAR *p
BOOL
(
*
filter
)(
const
BYTE
*
,
DWORD
);
}
mime_filters
[]
=
{
{
text_htmlW
,
text_html_filter
},
{
text_xmlW
,
text_xml_filter
},
{
text_richtextW
,
text_richtext_filter
},
/* {audio_xaiffW, audio_xaiff_filter}, */
{
audio_basicW
,
audio_basic_filter
},
...
...
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