bug 79837, r=pinkerton, sr=alecf, a=asa, don't disable mime matching for Internet Config mappings if we didn't get passed in a file extension

This commit is contained in:
pchen%netscape.com 2001-06-13 22:31:08 +00:00
Родитель 238a1736e2
Коммит 446c2fe869
2 изменённых файлов: 10 добавлений и 4 удалений

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

@ -175,8 +175,11 @@ nsresult nsInternetConfigService::GetMappingForMIMEType(const char *mimetype, co
PRBool domimecheck = PR_TRUE, gotmatch = PR_FALSE;
ICMapEntry ent;
if ((strcmp(mimetype, UNKNOWN_CONTENT_TYPE) == 0) ||
(strcmp(mimetype, APPLICATION_OCTET_STREAM) == 0))
// if mime type is "unknown" or "octet stream" *AND* we have a file extension,
// then disable match on mime type
if (((nsCRT::strcasecmp(mimetype, UNKNOWN_CONTENT_TYPE) == 0) ||
(nsCRT::strcasecmp(mimetype, APPLICATION_OCTET_STREAM) == 0)) &&
fileextension)
domimecheck = PR_FALSE;
entry->totalLength = 0;

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

@ -175,8 +175,11 @@ nsresult nsInternetConfigService::GetMappingForMIMEType(const char *mimetype, co
PRBool domimecheck = PR_TRUE, gotmatch = PR_FALSE;
ICMapEntry ent;
if ((strcmp(mimetype, UNKNOWN_CONTENT_TYPE) == 0) ||
(strcmp(mimetype, APPLICATION_OCTET_STREAM) == 0))
// if mime type is "unknown" or "octet stream" *AND* we have a file extension,
// then disable match on mime type
if (((nsCRT::strcasecmp(mimetype, UNKNOWN_CONTENT_TYPE) == 0) ||
(nsCRT::strcasecmp(mimetype, APPLICATION_OCTET_STREAM) == 0)) &&
fileextension)
domimecheck = PR_FALSE;
entry->totalLength = 0;