mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 09:05:45 +00:00
Make content-disposition parsing more forgiving. Fixes bug 121509 and a
few existing evang bugs. r=law, sr=mscott
This commit is contained in:
parent
8b00a952bf
commit
8ae7a333e4
@ -311,7 +311,7 @@ nsHeaderSniffer.prototype = {
|
||||
if (name) {
|
||||
const filenamePrefix = "filename=";
|
||||
var ix = name.indexOf(filenamePrefix);
|
||||
if (ix > 0) {
|
||||
if (ix >= 0) {
|
||||
// Adjust ix to point to start of actual name
|
||||
ix += filenamePrefix.length;
|
||||
filename = name.substr(ix, name.length);
|
||||
@ -319,7 +319,8 @@ nsHeaderSniffer.prototype = {
|
||||
ix = filename.lastIndexOf(";");
|
||||
if (ix > 0)
|
||||
filename = filename.substr(0, ix);
|
||||
// XXX strip out quotes;
|
||||
|
||||
filename = filename.replace(/^"|"$/g, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user