-
Notifications
You must be signed in to change notification settings - Fork 231
Fix: open as text link on downloads now uses utf-8 encoding #1109
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
base: next
Are you sure you want to change the base?
Conversation
| // FIXME: is this safe? See bug #131 | ||
| MediaType textMediaType = new MediaType("text/plain"); | ||
| MediaType textMediaType = new MediaType("text/plain;charset=utf-8"); | ||
| textMediaType.setParameter("charset", (e.getExpectedMimeType() != null) ? MediaType.getCharsetRobust(e.getExpectedMimeType()) : null); |
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.
It kinda looks like this line would immediately clobber whatever you’ve set in the constructor…
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.
damn, sometimes I’m dumb and blind … thank you for catching it. This would have been so much easier if I hadn’t done that late at night and left it uncommitted for weeks …
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.
No, this would have been easier if you had written a test first. 😄
(I’m currently trying to write one, but this would be easier if somebody merged #1043 first, because that one contains a lot of shit for easier tests. 🙂)
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.
Do you really mean the "quote n2ntm PR"?
(it feels like the quoting PR still needs so much work that I should only finish it after the next release)
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.
Actually, both #1043 and #1106, I need the added dependencies for this test I’m currently building for this… but I’d actually settle for #1106, it’s more important, we really need the updated Mockito version. 🙂
…but I can already say: nope, this also doesn’t work. 😁 (Actually, the next line [953] doesn’t.)
Thanks to Bombe for the review!
Tiny change, replaces most of the use-cases of the much more complex and incorrect #970