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

Change JavaScript MIME type #316

Closed
wants to merge 1 commit into from

Conversation

euj1n0ng
Copy link

A minor fix for successful testing.

text/javascript is a recommended standard (both by IETF and by MDN). application/javascript is obsolete.

Copy link
Member

@pfeairheller pfeairheller left a comment

Choose a reason for hiding this comment

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

This change will break this test as it's testing the return from the HTTP request.

If you want to change the MIME type of the actual request you'll have to update Hio, I believe

@euj1n0ng
Copy link
Author

This change will break this test as it's testing the return from the HTTP request.

If you want to change the MIME type of the actual request you'll have to update Hio, I believe

Yeah, you are right. At a glance, falcon still uses application/javascript for the JS MIME type in the simulation of HTTP request. However, surprisingly, on Ubuntu machine the test was failed on the stale MIME type while there was no problem on a Mac machine.
image

If you want, I'll close this PR. Of course, you can directly close it.

@euj1n0ng
Copy link
Author

falconry/falcon#2110

@pfeairheller
Copy link
Member

So we can close this issue here I assume?

@euj1n0ng
Copy link
Author

Yes.

@vytas7
Copy link

vytas7 commented Jun 3, 2023

Hello @euj1n0ng & @pfeairheller!
While we are looking to enforce Falcon's standard media types for some common file types, you can absolutely override this in your application if you wish.

Just add the desired types to your application's app.resp_options, for instance,

app.resp_options.static_media_types['.js'] = 'text/javascript'

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.

None yet

3 participants