зеркало из https://github.com/mozilla/pjs.git
Bug 743429 - channelType can also be binary/octet-stream in nsObjectLoadingContent::OnStartRequest. r=joshmoz
This commit is contained in:
Родитель
5c2e5e5fc5
Коммит
0f888426d2
|
@ -801,7 +801,8 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
|
||||||
// 1) The channel type is application/octet-stream and we have a
|
// 1) The channel type is application/octet-stream and we have a
|
||||||
// type hint and the type hint is not a document type.
|
// type hint and the type hint is not a document type.
|
||||||
// 2) Our type hint is a type that we support with a plugin.
|
// 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() &&
|
!mContentType.IsEmpty() &&
|
||||||
GetTypeOfContent(mContentType) != eType_Document) ||
|
GetTypeOfContent(mContentType) != eType_Document) ||
|
||||||
// Need to check IsPluginEnabledForType() in addition to GetTypeOfContent()
|
// Need to check IsPluginEnabledForType() in addition to GetTypeOfContent()
|
||||||
|
@ -827,7 +828,8 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mContentType.EqualsASCII(APPLICATION_OCTET_STREAM)) {
|
if (mContentType.EqualsASCII(APPLICATION_OCTET_STREAM) ||
|
||||||
|
mContentType.EqualsASCII(BINARY_OCTET_STREAM)) {
|
||||||
nsCAutoString extType;
|
nsCAutoString extType;
|
||||||
if (IsPluginEnabledByExtension(uri, extType)) {
|
if (IsPluginEnabledByExtension(uri, extType)) {
|
||||||
mContentType = extType;
|
mContentType = extType;
|
||||||
|
|
|
@ -108,6 +108,8 @@
|
||||||
#define AUDIO_WAV "audio/x-wav"
|
#define AUDIO_WAV "audio/x-wav"
|
||||||
#define AUDIO_WEBM "audio/webm"
|
#define AUDIO_WEBM "audio/webm"
|
||||||
|
|
||||||
|
#define BINARY_OCTET_STREAM "binary/octet-stream"
|
||||||
|
|
||||||
#define IMAGE_GIF "image/gif"
|
#define IMAGE_GIF "image/gif"
|
||||||
#define IMAGE_JPG "image/jpeg"
|
#define IMAGE_JPG "image/jpeg"
|
||||||
#define IMAGE_PJPG "image/pjpeg"
|
#define IMAGE_PJPG "image/pjpeg"
|
||||||
|
|
Загрузка…
Ссылка в новой задаче