Open benallenallen opened 10 years ago
Ben, just looking at this one - are we just doing a string match on the entire Content-Disposition header rather than just the token after "Content-Disposition" within the whole header?
Rather than stripping that out of the filename and causing weird behavior with users - shouldn't we just do a String manipulation on the header to get the token after "Content-Disposition" and determine if that contains "inline" or "attachment" ?
Not sure if I'm understanding you fully, but from what IE does, if anywhere in the Content-Disposition the word "attachment" appears, the IE bug is that it assumes you wanted to treat this as an attachment rather than inline. We would need to manually scrub the string "attachment" off of anything we put in the "filename=xxx" portion of the header to prevent this bad IE behaviour.
Changing the priority on this one - seems to be fixed in Chrome and IE11.
be careful of the Content-Disposition header and the word attachment. If you set the headers below, IE8 and IE9 will barf and attempt to download the file rather than displaying it inline. If we are using the inline Content-Disposition header anywhere, we need to strip the word "attachment" off of whatever we put into the filename just in cases.
Valid:
Invalid