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

Add settings to optionally skip filename* validation in ContentDisposition #5858

Open
dyadyaJora opened this issue Feb 4, 2025 · 0 comments

Comments

@dyadyaJora
Copy link

Hello, everyone!

When updating the major version of Jersey, I encountered an issue. Since strict validation of the filename* parameter in the Content-Disposition header was introduced in #4647 to comply with the required RFC, some previously working HTTP calls now produce errors.

For example, I have some external HTTP clients that (for reasons unknown to me) have similar values for both filename and filename*, where only the raw filename is saved (f.e. filename*=my-file.txt).

I believe I am not the only one facing this issue, and I think it would be useful to have an option - configured via environment variables or properties -that could temporarily disable strict filename* validation. This way, the filename and encoding could be populated with default values instead of throwing a ParseException.

I understand that such validation behavior is necessary, but allowing temporary flexibility could simplify the transition to the new version.

If you find this idea useful, please let me know, and I will prepare a PR.

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

No branches or pull requests

1 participant