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

Reading content-type header #269

Open
sadiqkhoja opened this issue Dec 18, 2024 · 0 comments
Open

Reading content-type header #269

sadiqkhoja opened this issue Dec 18, 2024 · 0 comments

Comments

@sadiqkhoja
Copy link
Contributor

Web Forms version and package (e.g. are you using web-forms or only the engine?)

[email protected]

Browser and version

Chrome 131.0.6778.140

Device used

MacOS

Problem description

Web Form is unable to determine the content type of the Form attachment from the response header. Because sometimes response content-type includes space between media type and charset, including examples here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type#examples

What do you think about this:

- return contentType.replace(/;charset=.*$/, '');
+ return contentType.replace(/;\s?charset=.*$/, '');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant