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

Question about name="_charset_" #66

Open
Kludex opened this issue Nov 13, 2024 · 2 comments
Open

Question about name="_charset_" #66

Kludex opened this issue Nov 13, 2024 · 2 comments
Labels
FAQ Solved or not a bug, but kept open for visibility

Comments

@Kludex
Copy link

Kludex commented Nov 13, 2024

Hi again, 👋

Sorry to keep bothering, but I'm learning a bit more about multipart.

On the README, I see that you mention that _charset_ is discouraged.
I cannot find that in https://www.rfc-editor.org/rfc/rfc7578.html, is it from somewhere else?

@defnull
Copy link
Owner

defnull commented Nov 13, 2024

Browsers follow https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data so field- and file-names should be encoded with utf8 by default for all modern web pages (plus partial percent encoding for exactly three special characters). All the legacy encoding schemes from the RFCs are no longer necessary, because segment headers are not required to be ASCII anymore. The algorithm to parse the Content-Disppsition headers also differs from that for normal HTTP headers. See #61 (not merged yet) for a details.

@defnull defnull added the FAQ Solved or not a bug, but kept open for visibility label Nov 13, 2024
@defnull
Copy link
Owner

defnull commented Nov 13, 2024

The readme is not completely honest here, RFC7578 does not discourage _charset_ but the W3C spec does. I should probably link that, too.

I'm also not completely against supporting _charset_ but I have not found any modern browser or library that does that yet, so I didn't bother. It would not be hard to implement, if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FAQ Solved or not a bug, but kept open for visibility
Projects
None yet
Development

No branches or pull requests

2 participants