Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't blow up when passing frozen string to send_file disposition.
Since `attachment` does an in-place mutation of `response['Content-Disposition']`, we need to guarantee that this object is not frozen. If a frozen string is passed in, `to_s` is a no-op and returned the same frozen string. So we need to make a new unfrozen string to allow this to work. Also this could have had interesting side effects if the user had passed in a string while holding a reference to it, they would have found their string to be changed by the call to send_file ``` x = 'inline' send_file(some_path, disposition: x) x == 'inline' #=> false ```
- Loading branch information