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
35e0e994
Commit
35e0e994
authored
Dec 12, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 13, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added application/x-msdownload mime filter.
parent
ac550a88
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
1 deletion
+17
-1
misc.c
dlls/urlmon/tests/misc.c
+9
-1
urlmon_main.c
dlls/urlmon/urlmon_main.c
+8
-0
No files found.
dlls/urlmon/tests/misc.c
View file @
35e0e994
...
...
@@ -347,6 +347,8 @@ static const WCHAR mimeAppXGzip[] = {'a','p','p','l','i','c','a','t','i','o','n'
'x'
,
'-'
,
'g'
,
'z'
,
'i'
,
'p'
,
'-'
,
'c'
,
'o'
,
'm'
,
'p'
,
'r'
,
'e'
,
's'
,
's'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
mimeAppJava
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'j'
,
'a'
,
'v'
,
'a'
,
0
};
static
const
WCHAR
mimeAppPdf
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'p'
,
'd'
,
'f'
,
0
};
static
const
WCHAR
mimeAppXMSDownload
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'x'
,
'-'
,
'm'
,
's'
,
'd'
,
'o'
,
'w'
,
'n'
,
'l'
,
'o'
,
'a'
,
'd'
,
0
};
static
const
struct
{
LPCWSTR
url
;
...
...
@@ -428,6 +430,9 @@ static BYTE data64[] = {0xca,0xfe,0xba,0xbe,'<','h','t','m','l','>',0};
static
BYTE
data65
[]
=
{
0x25
,
0x50
,
0x44
,
0x46
,
'x'
};
static
BYTE
data66
[]
=
{
0x25
,
0x50
,
0x44
,
0x46
};
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
const
struct
{
BYTE
*
data
;
...
...
@@ -500,7 +505,10 @@ static const struct {
{
data64
,
sizeof
(
data64
),
mimeTextHtml
},
{
data65
,
sizeof
(
data65
),
mimeAppPdf
},
{
data66
,
sizeof
(
data66
),
mimeTextPlain
},
{
data67
,
sizeof
(
data67
),
mimeTextHtml
}
{
data67
,
sizeof
(
data67
),
mimeTextHtml
},
{
data68
,
sizeof
(
data68
),
mimeAppXMSDownload
},
{
data69
,
sizeof
(
data69
),
mimeTextPlain
},
{
data70
,
sizeof
(
data70
),
mimeTextHtml
}
};
static
void
test_FindMimeFromData
(
void
)
...
...
dlls/urlmon/urlmon_main.c
View file @
35e0e994
...
...
@@ -489,6 +489,11 @@ static BOOL application_java_filter(const BYTE const *b, DWORD size)
return
size
>
4
&&
b
[
0
]
==
0xca
&&
b
[
1
]
==
0xfe
&&
b
[
2
]
==
0xba
&&
b
[
3
]
==
0xbe
;
}
static
BOOL
application_xmsdownload
(
const
BYTE
const
*
b
,
DWORD
size
)
{
return
size
>
2
&&
b
[
0
]
==
'M'
&&
b
[
1
]
==
'Z'
;
}
static
BOOL
text_plain_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
{
const
BYTE
*
ptr
;
...
...
@@ -557,6 +562,8 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
'x'
,
'-'
,
'g'
,
'z'
,
'i'
,
'p'
,
'-'
,
'c'
,
'o'
,
'm'
,
'p'
,
'r'
,
'e'
,
's'
,
's'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
wszAppJava
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'j'
,
'a'
,
'v'
,
'a'
,
0
};
static
const
WCHAR
wszAppXMSDownload
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'x'
,
'-'
,
'm'
,
's'
,
'd'
,
'o'
,
'w'
,
'n'
,
'l'
,
'o'
,
'a'
,
'd'
,
0
};
static
const
WCHAR
wszTextPlain
[]
=
{
't'
,
'e'
,
'x'
,
't'
,
'/'
,
'p'
,
'l'
,
'a'
,
'i'
,
'n'
,
'\0'
};
static
const
WCHAR
wszAppOctetStream
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'o'
,
'c'
,
't'
,
'e'
,
't'
,
'-'
,
's'
,
't'
,
'r'
,
'e'
,
'a'
,
'm'
,
'\0'
};
...
...
@@ -577,6 +584,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
{
wszAppXZip
,
application_xzip_filter
},
{
wszAppXGzip
,
application_xgzip_filter
},
{
wszAppJava
,
application_java_filter
},
{
wszAppXMSDownload
,
application_xmsdownload
},
{
wszTextPlain
,
text_plain_filter
},
{
wszAppOctetStream
,
application_octet_stream_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