Skip to content

Multipart filename support RFC6266 without language#4943

Draft
zapodot wants to merge 1 commit intoeclipse-ee4j:2.xfrom
zapodot:rfc6266/filenameFix
Draft

Multipart filename support RFC6266 without language#4943
zapodot wants to merge 1 commit intoeclipse-ee4j:2.xfrom
zapodot:rfc6266/filenameFix

Conversation

@zapodot
Copy link
Copy Markdown

@zapodot zapodot commented Dec 21, 2021

The RFC6266 does support having a language identifier as part of an encoded filename (content disposition param filename*), however the current Jersey Multipart parsing will not decode the filename if the language identifier is not present.

Example:

Content-Disposition: form-data; name=myfile; filename=myfile.pdf; filename*=utf-8''myfile.pdf

<content>

Currently when you bind this request to FormDataContentDisposition parameter the filename field value will be utf-8''myfile.pdf, but I would really expect it to be myfile.pdf

@jansupol
Copy link
Copy Markdown
Contributor

This looks like it makes sense, we do not need to have the charset a part of the header, it is already in the String actual charset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants