зеркало из https://github.com/mozilla/pjs.git
Fix for 82243; make sure we use "html" extension when saving files, if the MIME info gives us "htm". r=jfrancis, sr=scc
This commit is contained in:
Родитель
f18aea4935
Коммит
98def90047
|
@ -1762,8 +1762,14 @@ static nsresult GetExtensionForMIMEType(const char* inMIMEType, nsACString& outE
|
|||
rv = mimeInfo->FirstExtension(getter_Copies(fileExtension));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
outExtension.Assign(fileExtension);
|
||||
// the MIME service likes to give back ".htm" for text/html files,
|
||||
// so do a special-case fix here.
|
||||
nsCAutoString extensionStr(fileExtension);
|
||||
if (extensionStr.EqualsIgnoreCase("htm"))
|
||||
extensionStr.Assign("html");
|
||||
|
||||
outExtension.Assign(extensionStr);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -1762,8 +1762,14 @@ static nsresult GetExtensionForMIMEType(const char* inMIMEType, nsACString& outE
|
|||
rv = mimeInfo->FirstExtension(getter_Copies(fileExtension));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
outExtension.Assign(fileExtension);
|
||||
// the MIME service likes to give back ".htm" for text/html files,
|
||||
// so do a special-case fix here.
|
||||
nsCAutoString extensionStr(fileExtension);
|
||||
if (extensionStr.EqualsIgnoreCase("htm"))
|
||||
extensionStr.Assign("html");
|
||||
|
||||
outExtension.Assign(extensionStr);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче