Bug 743429 - channelType can also be binary/octet-stream in nsObjectLoadingContent::OnStartRequest. r=joshmoz

This commit is contained in:
David Keeler 2012-04-11 15:38:43 -07:00
Родитель 5c2e5e5fc5
Коммит 0f888426d2
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -801,7 +801,8 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
// 1) The channel type is application/octet-stream and we have a
// type hint and the type hint is not a document type.
// 2) Our type hint is a type that we support with a plugin.
if ((channelType.EqualsASCII(APPLICATION_OCTET_STREAM) &&
if (((channelType.EqualsASCII(APPLICATION_OCTET_STREAM) ||
channelType.EqualsASCII(BINARY_OCTET_STREAM)) &&
!mContentType.IsEmpty() &&
GetTypeOfContent(mContentType) != eType_Document) ||
// Need to check IsPluginEnabledForType() in addition to GetTypeOfContent()
@ -827,7 +828,8 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
return NS_ERROR_FAILURE;
}
if (mContentType.EqualsASCII(APPLICATION_OCTET_STREAM)) {
if (mContentType.EqualsASCII(APPLICATION_OCTET_STREAM) ||
mContentType.EqualsASCII(BINARY_OCTET_STREAM)) {
nsCAutoString extType;
if (IsPluginEnabledByExtension(uri, extType)) {
mContentType = extType;

Просмотреть файл

@ -108,6 +108,8 @@
#define AUDIO_WAV "audio/x-wav"
#define AUDIO_WEBM "audio/webm"
#define BINARY_OCTET_STREAM "binary/octet-stream"
#define IMAGE_GIF "image/gif"
#define IMAGE_JPG "image/jpeg"
#define IMAGE_PJPG "image/pjpeg"