20956. r=rpotts. necko no longer assumes any MIME type. we send out application/x-unknown-content-type internal MIME type if we don't *know* what the type is. It's now truly up to the app to figure out what to do

This commit is contained in:
valeski%netscape.com 1999-12-07 07:00:47 +00:00
Родитель 85ee74a4d7
Коммит d009686a61
3 изменённых файлов: 5 добавлений и 7 удалений

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

@ -47,6 +47,9 @@
#define NS_ERROR_IN_PROGRESS \
NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 15)
// internal unknown content-type
#define UNKNOWN_MIME "application/x-unknown-content-type"
#undef NS_NET
#ifdef _IMPL_NS_NET
#ifdef XP_PC

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

@ -369,8 +369,6 @@ nsFileChannel::SetLoadAttributes(PRUint32 aLoadAttributes)
return NS_OK;
}
#define DUMMY_TYPE "text/html"
NS_IMETHODIMP
nsFileChannel::GetContentType(char * *aContentType)
{
@ -388,8 +386,7 @@ nsFileChannel::GetContentType(char * *aContentType)
if (NS_SUCCEEDED(rv)) return rv;
}
// if all else fails treat it as text/html?
*aContentType = nsCRT::strdup(DUMMY_TYPE);
*aContentType = nsCRT::strdup(UNKNOWN_MIME);
if (!*aContentType) {
return NS_ERROR_OUT_OF_MEMORY;
} else {

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

@ -423,10 +423,8 @@ nsFTPChannel::GetContentType(char* *aContentType) {
}
}
// if all else fails treat it as unknown?
// XXX this will go away once we have AsyncOpen in place.
if (!*aContentType)
*aContentType = nsCRT::strdup("application/x-unknown-content-type");
*aContentType = nsCRT::strdup(UNKNOWN_MIME);
if (!*aContentType) {
rv = NS_ERROR_OUT_OF_MEMORY;
} else {