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
ec565fbf
Commit
ec565fbf
authored
Oct 23, 2007
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 23, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added text/richtext MIME filter.
parent
7ce4194c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
misc.c
dlls/urlmon/tests/misc.c
+10
-1
urlmon_main.c
dlls/urlmon/urlmon_main.c
+6
-0
No files found.
dlls/urlmon/tests/misc.c
View file @
ec565fbf
...
...
@@ -345,6 +345,7 @@ static void test_CoInternetCompareUrl(void)
static
const
WCHAR
mimeTextHtml
[]
=
{
't'
,
'e'
,
'x'
,
't'
,
'/'
,
'h'
,
't'
,
'm'
,
'l'
,
0
};
static
const
WCHAR
mimeTextPlain
[]
=
{
't'
,
'e'
,
'x'
,
't'
,
'/'
,
'p'
,
'l'
,
'a'
,
'i'
,
'n'
,
0
};
static
const
WCHAR
mimeTextRichtext
[]
=
{
't'
,
'e'
,
'x'
,
't'
,
'/'
,
'r'
,
'i'
,
'c'
,
'h'
,
't'
,
'e'
,
'x'
,
't'
,
0
};
static
const
WCHAR
mimeAppOctetStream
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'o'
,
'c'
,
't'
,
'e'
,
't'
,
'-'
,
's'
,
't'
,
'r'
,
'e'
,
'a'
,
'm'
,
0
};
static
const
WCHAR
mimeImagePjpeg
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
'p'
,
'j'
,
'p'
,
'e'
,
'g'
,
0
};
...
...
@@ -449,6 +450,10 @@ static BYTE data67[] = {0x25,0x50,0x44,0x46,'x','<','h','t','m','l','>'};
static
BYTE
data68
[]
=
{
'M'
,
'Z'
,
'x'
};
static
BYTE
data69
[]
=
{
'M'
,
'Z'
};
static
BYTE
data70
[]
=
{
'M'
,
'Z'
,
'<'
,
'h'
,
't'
,
'm'
,
'l'
,
'>'
,
0xff
};
static
BYTE
data71
[]
=
{
'{'
,
'\\'
,
'r'
,
't'
,
'f'
,
0
};
static
BYTE
data72
[]
=
{
'{'
,
'\\'
,
'r'
,
't'
,
'f'
};
static
BYTE
data73
[]
=
{
' '
,
'{'
,
'\\'
,
'r'
,
't'
,
'f'
,
' '
};
static
BYTE
data74
[]
=
{
'{'
,
'\\'
,
'r'
,
't'
,
'f'
,
'<'
,
'h'
,
't'
,
'm'
,
'l'
,
'>'
,
' '
};
static
const
struct
{
BYTE
*
data
;
...
...
@@ -524,7 +529,11 @@ static const struct {
{
data67
,
sizeof
(
data67
),
mimeTextHtml
},
{
data68
,
sizeof
(
data68
),
mimeAppXMSDownload
},
{
data69
,
sizeof
(
data69
),
mimeTextPlain
},
{
data70
,
sizeof
(
data70
),
mimeTextHtml
}
{
data70
,
sizeof
(
data70
),
mimeTextHtml
},
{
data71
,
sizeof
(
data71
),
mimeTextRichtext
},
{
data72
,
sizeof
(
data72
),
mimeTextPlain
},
{
data73
,
sizeof
(
data73
),
mimeTextPlain
},
{
data74
,
sizeof
(
data74
),
mimeTextHtml
}
};
static
void
test_FindMimeFromData
(
void
)
...
...
dlls/urlmon/urlmon_main.c
View file @
ec565fbf
...
...
@@ -408,6 +408,10 @@ void WINAPI ReleaseBindInfo(BINDINFO* pbindinfo)
pbindinfo
->
cbSize
=
size
;
}
static
BOOL
text_richtext_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
5
&&
!
memcmp
(
b
,
"{
\\
rtf"
,
5
);
}
static
BOOL
text_html_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
...
...
@@ -559,6 +563,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
int
i
;
static
const
WCHAR
wszTextHtml
[]
=
{
't'
,
'e'
,
'x'
,
't'
,
'/'
,
'h'
,
't'
,
'm'
,
'l'
,
0
};
static
const
WCHAR
wszTextRichtext
[]
=
{
't'
,
'e'
,
'x'
,
't'
,
'/'
,
'r'
,
'i'
,
'c'
,
'h'
,
't'
,
'e'
,
'x'
,
't'
,
0
};
static
const
WCHAR
wszImageGif
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
'g'
,
'i'
,
'f'
,
0
};
static
const
WCHAR
wszImagePjpeg
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
'p'
,
'j'
,
'p'
,
'e'
,
'g'
,
0
};
static
const
WCHAR
wszImageTiff
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
't'
,
'i'
,
'f'
,
'f'
,
0
};
...
...
@@ -585,6 +590,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
BOOL
(
*
filter
)(
const
BYTE
*
,
DWORD
);
}
mime_filters
[]
=
{
{
wszTextHtml
,
text_html_filter
},
{
wszTextRichtext
,
text_richtext_filter
},
{
wszImageGif
,
image_gif_filter
},
{
wszImagePjpeg
,
image_pjpeg_filter
},
{
wszImageTiff
,
image_tiff_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