Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HttpFoundation] implemented RFC6266 (Content-Disposition header)
references: * http://trac.tools.ietf.org/wg/httpbis/trac/wiki/ContentDispositionProducerAdvice * https://github.com/mnot/sweet/blob/master/lib/index.js * http://www.mnot.net/blog/2011/09/02/rfc6266_and_content-disposition
- Loading branch information
Showing
3 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 comments
on commit dccd2d5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, didn't know about filename*=utf-8
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Should makeDisposition also check for invalid arguments for "disposition" - i.e. if not exactly "attachment" or "inline" throw invalid argument exception.
- Could two constants DISPOSITION_ATTACHMENT and DISPOSITION_INLINE be added instead of relying on the strings? Helps with autocomplete, and also ensures you don't accidentally type "Inline" or something.
Happy to make issues if you like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonathaningram You're right, see #2132
preg_match('#[/\]#', $filename.$filenameFallback) is little bit faster