Treat "https" the same as "http" for filename-determination purposes. Bug

263839 partial fix, patch by Phil <Time_lord@hotmail.com>, r=bzbarsky, sr=neil
This commit is contained in:
bzbarsky%mit.edu 2004-11-10 16:25:31 +00:00
parent b67ab5bad7
commit c31b08b5c3

View File

@ -433,8 +433,7 @@ function initFileInfo(aFI, aURL, aDocument, aContentType)
// if saveURL(...) was the original caller (hence both aContentType and
// aDocument are blank). If they were saving a link to a website then make
// the extension .htm .
if (!aFI.fileExt && !aDocument && !aContentType && (aURL.length > 7) &&
aURL.substring(0,7).toUpperCase() == "HTTP://") {
if (!aFI.fileExt && !aDocument && !aContentType && (/^http(s?):\/\//i.test(aURL))) {
aFI.fileExt = "htm";
aFI.fileBaseName = aFI.fileName;
} else {