bug 229785 also allow "Content-Disposition: name=foo" headers, in addition to filename=foo

r=bzbarsky sr=darin
This commit is contained in:
cbiesinger%web.de 2004-01-07 20:23:46 +00:00
Родитель 2b4e3cb0c0
Коммит fe5166ce4b
2 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -391,7 +391,9 @@ nsresult nsDocumentOpenInfo::DispatchContent(nsIRequest *request, nsISupports *
// Broken sites just send
// Content-Disposition: filename="file"
// without a disposition token... screen those out.
!dispToken.EqualsIgnoreCase("filename", 8)))
!dispToken.EqualsIgnoreCase("filename", 8)) &&
// Also in use is Content-Disposition: name="file"
!dispToken.EqualsIgnoreCase("name", 4))
// We have a content-disposition of "attachment" or unknown
forceExternalHandling = PR_TRUE;
}

Просмотреть файл

@ -224,7 +224,9 @@ static PRBool GetFilenameAndExtensionFromChannel(nsIChannel* aChannel,
// Broken sites just send
// Content-Disposition: filename="file"
// without a disposition token... screen those out.
!dispToken.EqualsIgnoreCase("filename", 8)))
!dispToken.EqualsIgnoreCase("filename", 8)) &&
// Also in use is Content-Disposition: name="file"
!dispToken.EqualsIgnoreCase("name", 4))
{
// We have a content-disposition of "attachment" or unknown
handleExternally = PR_TRUE;