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

git-svn-id: svn://10.0.0.236/trunk@97088 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pchen%netscape.com 2001-06-13 22:31:08 +00:00
parent 7142449c8f
commit f5f4807dcc
2 changed files with 10 additions and 4 deletions

View File

@ -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;

View File

@ -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;