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
edf73245
Commit
edf73245
authored
Dec 06, 2006
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added application/java mime filter.
parent
d5c6f6ec
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
misc.c
dlls/urlmon/tests/misc.c
+10
-1
urlmon_main.c
dlls/urlmon/urlmon_main.c
+8
-0
No files found.
dlls/urlmon/tests/misc.c
View file @
edf73245
...
@@ -339,10 +339,13 @@ static const WCHAR mimeImageXPng[] = {'i','m','a','g','e','/','x','-','p','n','g
...
@@ -339,10 +339,13 @@ static const WCHAR mimeImageXPng[] = {'i','m','a','g','e','/','x','-','p','n','g
static
const
WCHAR
mimeImageTiff
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
't'
,
'i'
,
'f'
,
'f'
,
0
};
static
const
WCHAR
mimeImageTiff
[]
=
{
'i'
,
'm'
,
'a'
,
'g'
,
'e'
,
'/'
,
't'
,
'i'
,
'f'
,
'f'
,
0
};
static
const
WCHAR
mimeVideoAvi
[]
=
{
'v'
,
'i'
,
'd'
,
'e'
,
'o'
,
'/'
,
'a'
,
'v'
,
'i'
,
0
};
static
const
WCHAR
mimeVideoAvi
[]
=
{
'v'
,
'i'
,
'd'
,
'e'
,
'o'
,
'/'
,
'a'
,
'v'
,
'i'
,
0
};
static
const
WCHAR
mimeVideoMpeg
[]
=
{
'v'
,
'i'
,
'd'
,
'e'
,
'o'
,
'/'
,
'm'
,
'p'
,
'e'
,
'g'
,
0
};
static
const
WCHAR
mimeVideoMpeg
[]
=
{
'v'
,
'i'
,
'd'
,
'e'
,
'o'
,
'/'
,
'm'
,
'p'
,
'e'
,
'g'
,
0
};
static
const
WCHAR
mimeAppXCompressed
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'x'
,
'-'
,
'c'
,
'o'
,
'm'
,
'p'
,
'r'
,
'e'
,
's'
,
's'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
mimeAppXZip
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
static
const
WCHAR
mimeAppXZip
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
'x'
,
'-'
,
'z'
,
'i'
,
'p'
,
'-'
,
'c'
,
'o'
,
'm'
,
'p'
,
'r'
,
'e'
,
's'
,
's'
,
'e'
,
'd'
,
0
};
'x'
,
'-'
,
'z'
,
'i'
,
'p'
,
'-'
,
'c'
,
'o'
,
'm'
,
'p'
,
'r'
,
'e'
,
's'
,
's'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
mimeAppXGzip
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
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
};
'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
struct
{
static
const
struct
{
LPCWSTR
url
;
LPCWSTR
url
;
...
@@ -418,6 +421,9 @@ static BYTE data58[] = {0x1f,0x8b};
...
@@ -418,6 +421,9 @@ static BYTE data58[] = {0x1f,0x8b};
static
BYTE
data59
[]
=
{
0x50
,
0x4b
,
'x'
};
static
BYTE
data59
[]
=
{
0x50
,
0x4b
,
'x'
};
static
BYTE
data60
[]
=
{
0x50
,
0x4b
};
static
BYTE
data60
[]
=
{
0x50
,
0x4b
};
static
BYTE
data61
[]
=
{
0x50
,
0x4b
,
'<'
,
'h'
,
't'
,
'm'
,
'l'
,
'>'
,
0
};
static
BYTE
data61
[]
=
{
0x50
,
0x4b
,
'<'
,
'h'
,
't'
,
'm'
,
'l'
,
'>'
,
0
};
static
BYTE
data62
[]
=
{
0xca
,
0xfe
,
0xba
,
0xbe
,
'x'
};
static
BYTE
data63
[]
=
{
0xca
,
0xfe
,
0xba
,
0xbe
};
static
BYTE
data64
[]
=
{
0xca
,
0xfe
,
0xba
,
0xbe
,
'<'
,
'h'
,
't'
,
'm'
,
'l'
,
'>'
,
0
};
static
const
struct
{
static
const
struct
{
BYTE
*
data
;
BYTE
*
data
;
...
@@ -484,7 +490,10 @@ static const struct {
...
@@ -484,7 +490,10 @@ static const struct {
{
data58
,
sizeof
(
data58
),
mimeAppOctetStream
},
{
data58
,
sizeof
(
data58
),
mimeAppOctetStream
},
{
data59
,
sizeof
(
data59
),
mimeAppXZip
},
{
data59
,
sizeof
(
data59
),
mimeAppXZip
},
{
data60
,
sizeof
(
data60
),
mimeTextPlain
},
{
data60
,
sizeof
(
data60
),
mimeTextPlain
},
{
data61
,
sizeof
(
data61
),
mimeTextHtml
}
{
data61
,
sizeof
(
data61
),
mimeTextHtml
},
{
data62
,
sizeof
(
data62
),
mimeAppJava
},
{
data63
,
sizeof
(
data63
),
mimeTextPlain
},
{
data64
,
sizeof
(
data64
),
mimeTextHtml
}
};
};
static
void
test_FindMimeFromData
(
void
)
static
void
test_FindMimeFromData
(
void
)
...
...
dlls/urlmon/urlmon_main.c
View file @
edf73245
...
@@ -479,6 +479,11 @@ static BOOL application_xgzip_filter(const BYTE const *b, DWORD size)
...
@@ -479,6 +479,11 @@ static BOOL application_xgzip_filter(const BYTE const *b, DWORD size)
return
size
>
2
&&
b
[
0
]
==
0x1f
&&
b
[
1
]
==
0x8b
;
return
size
>
2
&&
b
[
0
]
==
0x1f
&&
b
[
1
]
==
0x8b
;
}
}
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
text_plain_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
static
BOOL
text_plain_filter
(
const
BYTE
const
*
b
,
DWORD
size
)
{
{
const
BYTE
*
ptr
;
const
BYTE
*
ptr
;
...
@@ -543,6 +548,8 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
...
@@ -543,6 +548,8 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
'x'
,
'-'
,
'z'
,
'i'
,
'p'
,
'-'
,
'c'
,
'o'
,
'm'
,
'p'
,
'r'
,
'e'
,
's'
,
's'
,
'e'
,
'd'
,
0
};
'x'
,
'-'
,
'z'
,
'i'
,
'p'
,
'-'
,
'c'
,
'o'
,
'm'
,
'p'
,
'r'
,
'e'
,
's'
,
's'
,
'e'
,
'd'
,
0
};
static
const
WCHAR
wszAppXGzip
[]
=
{
'a'
,
'p'
,
'p'
,
'l'
,
'i'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'/'
,
static
const
WCHAR
wszAppXGzip
[]
=
{
'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
};
'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
wszTextPlain
[]
=
{
't'
,
'e'
,
'x'
,
't'
,
'/'
,
'p'
,
'l'
,
'a'
,
'i'
,
'n'
,
'\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'
,
'/'
,
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'
};
'o'
,
'c'
,
't'
,
'e'
,
't'
,
'-'
,
's'
,
't'
,
'r'
,
'e'
,
'a'
,
'm'
,
'\0'
};
...
@@ -561,6 +568,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
...
@@ -561,6 +568,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
{
wszVideoMpeg
,
video_mpeg_filter
},
{
wszVideoMpeg
,
video_mpeg_filter
},
{
wszAppXZip
,
application_xzip_filter
},
{
wszAppXZip
,
application_xzip_filter
},
{
wszAppXGzip
,
application_xgzip_filter
},
{
wszAppXGzip
,
application_xgzip_filter
},
{
wszAppJava
,
application_java_filter
},
{
wszTextPlain
,
text_plain_filter
},
{
wszTextPlain
,
text_plain_filter
},
{
wszAppOctetStream
,
application_octet_stream_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