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

Implement RFC8187 filenames for Content-Disposition in MultiPart #12413

Merged
merged 2 commits into from
Oct 23, 2024

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Oct 22, 2024

Implement RFC8187 filenames for Content-Disposition in MultiPart

For #12396

@gregw gregw linked an issue Oct 22, 2024 that may be closed by this pull request
39 tasks
@gregw gregw removed a link to an issue Oct 22, 2024
39 tasks
{
assertThat(MultiPart.encodeContentDispositionFileName("test.xml"), is("filename=\"test.xml\""));
assertThat(MultiPart.encodeContentDispositionFileName("test ✓.xml"), is("filename=\"test _.xml\"; filename*=UTF-8''test%20%E2%9C%93.xml"));
assertThat(MultiPart.encodeContentDispositionFileName("test ✓.xml", StandardCharsets.UTF_16), is("filename=\"test _.xml\"; filename*=UTF-16''╆䔥䙆┰ぴ┰づ┰び┰ぴ┰〫┲㜥ㄳ┰〮┰へ┰ね┰ぬ"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at UTF-16 in the raw like this is so weird.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I think it is OK to have like that.... but it is strange.

@gregw gregw merged commit ef57199 into jetty-12.1.x Oct 23, 2024
10 checks passed
@gregw gregw deleted the fix/12396/multipart branch October 23, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants