39797. r=mscott. MAC was sending back an empty string as the mime type down in the MIMEService, now we return an error in the mime service if we confront this, and that causes HTTP to produce a default type

This commit is contained in:
valeski%netscape.com 2000-07-21 23:52:36 +00:00
parent 40d98d5682
commit 83689d9542
2 changed files with 6 additions and 0 deletions

View File

@ -104,6 +104,9 @@ NS_IMETHODIMP
nsMIMEInfoImpl::GetMIMEType(char * *aMIMEType) {
if (!aMIMEType) return NS_ERROR_NULL_POINTER;
if (mMIMEType.Length() < 1)
return NS_ERROR_NOT_INITIALIZED;
*aMIMEType = mMIMEType.ToNewCString();
if (!*aMIMEType) return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;

View File

@ -104,6 +104,9 @@ NS_IMETHODIMP
nsMIMEInfoImpl::GetMIMEType(char * *aMIMEType) {
if (!aMIMEType) return NS_ERROR_NULL_POINTER;
if (mMIMEType.Length() < 1)
return NS_ERROR_NOT_INITIALIZED;
*aMIMEType = mMIMEType.ToNewCString();
if (!*aMIMEType) return NS_ERROR_OUT_OF_MEMORY;
return NS_OK;