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
5321c715
Commit
5321c715
authored
Feb 18, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added audio/basic MIME filter.
parent
37400798
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
misc.c
dlls/urlmon/tests/misc.c
+10
-1
urlmon_main.c
dlls/urlmon/urlmon_main.c
+8
-1
No files found.
dlls/urlmon/tests/misc.c
View file @
5321c715
...
...
@@ -421,6 +421,7 @@ static const WCHAR mimeAppPdf[] = {'a','p','p','l','i','c','a','t','i','o','n','
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
WCHAR
mimeAudioWav
[]
=
{
'a'
,
'u'
,
'd'
,
'i'
,
'o'
,
'/'
,
'w'
,
'a'
,
'v'
,
0
};
static
const
WCHAR
mimeAudioBasic
[]
=
{
'a'
,
'u'
,
'd'
,
'i'
,
'o'
,
'/'
,
'b'
,
'a'
,
's'
,
'i'
,
'c'
,
0
};
static
const
struct
{
LPCWSTR
url
;
...
...
@@ -517,6 +518,10 @@ static BYTE data78[] = {'R','I','F','F',0xff,0xff,0xff,0xff,'<','h','t','m','l',
static
BYTE
data79
[]
=
{
'%'
,
'!'
,
0xff
};
static
BYTE
data80
[]
=
{
'%'
,
'!'
};
static
BYTE
data81
[]
=
{
'%'
,
'!'
,
'P'
,
'S'
,
'<'
,
'h'
,
't'
,
'm'
,
'l'
,
'>'
};
static
BYTE
data82
[]
=
{
'.'
,
's'
,
'n'
,
'd'
,
0
};
static
BYTE
data83
[]
=
{
'.'
,
's'
,
'n'
,
'd'
};
static
BYTE
data84
[]
=
{
'.'
,
's'
,
'n'
,
'd'
,
0
,
'<'
,
'h'
,
't'
,
'm'
,
'l'
,
'>'
,
1
,
1
};
static
BYTE
data85
[]
=
{
'.'
,
'S'
,
'N'
,
'D'
,
0
};
static
const
struct
{
BYTE
*
data
;
...
...
@@ -603,7 +608,11 @@ static const struct {
{
data78
,
sizeof
(
data78
),
mimeTextHtml
},
{
data79
,
sizeof
(
data79
),
mimeAppPostscript
},
{
data80
,
sizeof
(
data80
),
mimeTextPlain
},
{
data81
,
sizeof
(
data81
),
mimeTextHtml
}
{
data81
,
sizeof
(
data81
),
mimeTextHtml
},
{
data82
,
sizeof
(
data82
),
mimeAudioBasic
},
{
data83
,
sizeof
(
data83
),
mimeTextPlain
},
{
data84
,
sizeof
(
data84
),
mimeTextHtml
},
{
data85
,
sizeof
(
data85
),
mimeTextPlain
}
};
static
void
test_FindMimeFromData
(
void
)
...
...
dlls/urlmon/urlmon_main.c
View file @
5321c715
...
...
@@ -469,6 +469,12 @@ static BOOL text_html_filter(const BYTE *b, DWORD size)
return
FALSE
;
}
static
BOOL
audio_basic_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
4
&&
b
[
0
]
==
'.'
&&
b
[
1
]
==
's'
&&
b
[
2
]
==
'n'
&&
b
[
3
]
==
'd'
;
}
static
BOOL
audio_wav_filter
(
const
BYTE
*
b
,
DWORD
size
)
{
return
size
>
12
...
...
@@ -613,6 +619,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
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
wszAudioBasic
[]
=
{
'a'
,
'u'
,
'd'
,
'i'
,
'o'
,
'/'
,
'b'
,
'a'
,
's'
,
'i'
,
'c'
,
0
};
static
const
WCHAR
wszAudioWav
[]
=
{
'a'
,
'u'
,
'd'
,
'i'
,
'o'
,
'/'
,
'w'
,
'a'
,
'v'
,
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
};
...
...
@@ -644,7 +651,7 @@ HRESULT WINAPI FindMimeFromData(LPBC pBC, LPCWSTR pwzUrl, LPVOID pBuffer,
{
wszTextHtml
,
text_html_filter
},
{
wszTextRichtext
,
text_richtext_filter
},
/* {wszAudioXAiff, audio_xaiff_filter}, */
/* {wszAudioBasic, audio_basic_filter}, */
{
wszAudioBasic
,
audio_basic_filter
},
{
wszAudioWav
,
audio_wav_filter
},
{
wszImageGif
,
image_gif_filter
},
{
wszImagePjpeg
,
image_pjpeg_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