зеркало из https://github.com/mozilla/pjs.git
nsJARProtocol.cpp
This commit is contained in:
Родитель
ebbe7f1919
Коммит
c361fb197f
|
@ -368,8 +368,6 @@ nsJARChannel::SetLoadAttributes(PRUint32 aLoadFlags)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DEFAULT_TYPE "text/plain" // "application/x-unknown-content-type"
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsJARChannel::GetContentType(char* *aContentType)
|
nsJARChannel::GetContentType(char* *aContentType)
|
||||||
{
|
{
|
||||||
|
@ -405,8 +403,7 @@ nsJARChannel::GetContentType(char* *aContentType)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
// if all else fails treat it as the default:
|
mContentType = nsCRT::strdup(UNKNOWN_MIME);
|
||||||
mContentType = nsCRT::strdup(DEFAULT_TYPE);
|
|
||||||
if (mContentType == nsnull)
|
if (mContentType == nsnull)
|
||||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||||
else
|
else
|
||||||
|
|
|
@ -368,8 +368,6 @@ nsJARChannel::SetLoadAttributes(PRUint32 aLoadFlags)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DEFAULT_TYPE "text/plain" // "application/x-unknown-content-type"
|
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsJARChannel::GetContentType(char* *aContentType)
|
nsJARChannel::GetContentType(char* *aContentType)
|
||||||
{
|
{
|
||||||
|
@ -405,8 +403,7 @@ nsJARChannel::GetContentType(char* *aContentType)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
// if all else fails treat it as the default:
|
mContentType = nsCRT::strdup(UNKNOWN_MIME);
|
||||||
mContentType = nsCRT::strdup(DEFAULT_TYPE);
|
|
||||||
if (mContentType == nsnull)
|
if (mContentType == nsnull)
|
||||||
rv = NS_ERROR_OUT_OF_MEMORY;
|
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||||
else
|
else
|
||||||
|
|
Загрузка…
Ссылка в новой задаче