Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HotFix: Patching Marcel MimeType sniffing #778

Merged
merged 1 commit into from
Apr 4, 2023
Merged

HotFix: Patching Marcel MimeType sniffing #778

merged 1 commit into from
Apr 4, 2023

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Apr 4, 2023

Note: This does not included tests, which is something that #744 also did not. However, we have verified the behavior.

Reading the documentation for the Marcel gem, it requires a file handle (e.g. File.new or File.open) instead of a String.

When given a String for ::Marcel::MimeType.for the returned value is application/octet-stream.

Related to:

Note: This does not included tests, which is something that #777 also
did not.  However, we have verified the behavior.

Reading the [documentation for the Marcel gem][1], it requires a file
handle (e.g. `File.new` or `File.open`) instead of a String.

When given a `String` for `::Marcel::MimeType.for` the returned value is
`application/octet-stream`.

Related to:

- #777

[1]: https://github.com/rails/marcel
@jeremyf jeremyf added patch-ver for release notes bug-fix labels Apr 4, 2023
@laritakr laritakr merged commit 04d35b0 into main Apr 4, 2023
@laritakr laritakr deleted the hotfix branch April 4, 2023 16:38
@alishaevn
Copy link
Contributor

👍🏾

jeremyf added a commit to scientist-softserv/britishlibrary that referenced this pull request Apr 4, 2023
jeremyf added a commit that referenced this pull request Apr 4, 2023
Prior to this commit, when we run `File.new` we were opening the file.
We did not, however, close the file.

With this commit, I've leverage the `File.open` with block behavior to
open and ensure that we close the file.

Related to:

#779
#778
#777
jeremyf added a commit that referenced this pull request Apr 4, 2023
Prior to this commit, when we run `File.new` we were opening the file.
We did not, however, close the file.

With this commit, I've leverage the `File.open` with block behavior to
open and ensure that we close the file.

Related to:

#779
#778
#777
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix patch-ver for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants