зеркало из https://github.com/mozilla/pjs.git
bug 229785 also allow "Content-Disposition: name=foo" headers, in addition to filename=foo
r=bzbarsky sr=darin
This commit is contained in:
Родитель
2b4e3cb0c0
Коммит
fe5166ce4b
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче