diff --git a/mozilla/modules/libjar/nsJARChannel.cpp b/mozilla/modules/libjar/nsJARChannel.cpp index 37ac3f96b9e..4ec20c22aa0 100644 --- a/mozilla/modules/libjar/nsJARChannel.cpp +++ b/mozilla/modules/libjar/nsJARChannel.cpp @@ -29,6 +29,7 @@ #include "nsAutoLock.h" #include "nsIFileStreams.h" #include "nsIPrincipal.h" +#include "nsMimeTypes.h" static NS_DEFINE_CID(kFileTransportServiceCID, NS_FILETRANSPORTSERVICE_CID); static NS_DEFINE_CID(kMIMEServiceCID, NS_MIMESERVICE_CID); @@ -499,7 +500,7 @@ nsJARChannel::GetContentType(char* *aContentType) } if (NS_FAILED(rv)) { - mContentType = nsCRT::strdup(UNKNOWN_MIME); + mContentType = nsCRT::strdup(UNKNOWN_CONTENT_TYPE); if (mContentType == nsnull) rv = NS_ERROR_OUT_OF_MEMORY; else diff --git a/mozilla/netwerk/protocol/file/src/nsFileChannel.cpp b/mozilla/netwerk/protocol/file/src/nsFileChannel.cpp index 27ffbf77e56..c09103421a1 100644 --- a/mozilla/netwerk/protocol/file/src/nsFileChannel.cpp +++ b/mozilla/netwerk/protocol/file/src/nsFileChannel.cpp @@ -29,7 +29,7 @@ #include "nsIFileTransportService.h" #include "nsIFile.h" #include "nsInt64.h" - +#include "nsMimeTypes.h" #include "prio.h" // Need to pick up def of PR_RDONLY static NS_DEFINE_CID(kFileTransportServiceCID, NS_FILETRANSPORTSERVICE_CID); @@ -347,7 +347,7 @@ nsFileChannel::GetContentType(char * *aContentType) } if (mContentType.IsEmpty()) { - mContentType = UNKNOWN_MIME; + mContentType = UNKNOWN_CONTENT_TYPE; } } *aContentType = mContentType.ToNewCString(); diff --git a/mozilla/netwerk/protocol/ftp/src/nsFTPChannel.cpp b/mozilla/netwerk/protocol/ftp/src/nsFTPChannel.cpp index e38b162351e..c2a2beca5b1 100644 --- a/mozilla/netwerk/protocol/ftp/src/nsFTPChannel.cpp +++ b/mozilla/netwerk/protocol/ftp/src/nsFTPChannel.cpp @@ -30,6 +30,7 @@ #include "nsIMIMEService.h" #include "nsIPipe.h" #include "nsNetUtil.h" +#include "nsMimeTypes.h" static NS_DEFINE_CID(kMIMEServiceCID, NS_MIMESERVICE_CID); @@ -420,7 +421,7 @@ nsFTPChannel::GetContentType(char* *aContentType) { if (NS_SUCCEEDED(rv)) { mContentType = *aContentType; } else { - mContentType = UNKNOWN_MIME; + mContentType = UNKNOWN_CONTENT_TYPE; rv = NS_OK; } } diff --git a/mozilla/netwerk/protocol/http/src/nsHTTPChannel.cpp b/mozilla/netwerk/protocol/http/src/nsHTTPChannel.cpp index 8618cf6e215..1fce581fdc9 100644 --- a/mozilla/netwerk/protocol/http/src/nsHTTPChannel.cpp +++ b/mozilla/netwerk/protocol/http/src/nsHTTPChannel.cpp @@ -50,6 +50,7 @@ #include "nsINetDataCacheManager.h" #include "nsINetDataCache.h" #include "nsIScriptSecurityManager.h" +#include "nsMimeTypes.h" #ifdef DEBUG_gagan #include "nsUnixColorPrintf.h" @@ -327,7 +328,7 @@ nsHTTPChannel::GetContentType(char * *aContentType) } if (!*aContentType) - *aContentType = nsCRT::strdup(UNKNOWN_MIME); + *aContentType = nsCRT::strdup(UNKNOWN_CONTENT_TYPE); if (!*aContentType) { rv = NS_ERROR_OUT_OF_MEMORY; } else { diff --git a/mozilla/netwerk/protocol/http/src/nsHTTPHandler.cpp b/mozilla/netwerk/protocol/http/src/nsHTTPHandler.cpp index f8269048fb9..430c84a53e0 100644 --- a/mozilla/netwerk/protocol/http/src/nsHTTPHandler.cpp +++ b/mozilla/netwerk/protocol/http/src/nsHTTPHandler.cpp @@ -575,14 +575,16 @@ nsHTTPHandler::Init() nsXPIDLCString locale; rv = prefs->CopyCharPref("general.useragent.locale", getter_Copies(locale)); - if (NS_FAILED(rv)) return rv; - mAppLanguage = locale; + if (NS_SUCCEEDED(rv)) { + mAppLanguage = locale; + } nsXPIDLCString milestone; rv = prefs->CopyCharPref("general.milestone", getter_Copies(milestone)); - if (NS_FAILED(rv)) return rv; - mAppVersion += milestone; + if (NS_SUCCEEDED(rv)) { + mAppVersion += milestone; + } // Platform #if defined(XP_PC) diff --git a/mozilla/netwerk/protocol/jar/src/nsJARChannel.cpp b/mozilla/netwerk/protocol/jar/src/nsJARChannel.cpp index 37ac3f96b9e..4ec20c22aa0 100644 --- a/mozilla/netwerk/protocol/jar/src/nsJARChannel.cpp +++ b/mozilla/netwerk/protocol/jar/src/nsJARChannel.cpp @@ -29,6 +29,7 @@ #include "nsAutoLock.h" #include "nsIFileStreams.h" #include "nsIPrincipal.h" +#include "nsMimeTypes.h" static NS_DEFINE_CID(kFileTransportServiceCID, NS_FILETRANSPORTSERVICE_CID); static NS_DEFINE_CID(kMIMEServiceCID, NS_MIMESERVICE_CID); @@ -499,7 +500,7 @@ nsJARChannel::GetContentType(char* *aContentType) } if (NS_FAILED(rv)) { - mContentType = nsCRT::strdup(UNKNOWN_MIME); + mContentType = nsCRT::strdup(UNKNOWN_CONTENT_TYPE); if (mContentType == nsnull) rv = NS_ERROR_OUT_OF_MEMORY; else