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

Changes application/javascript to application/json in Rest #14972

Merged
merged 1 commit into from May 2, 2019

Conversation

@mustafaiman
Copy link
Contributor

mustafaiman commented May 2, 2019

Rest API used application/javascript "Content-Type" header to respond with json documents. This mime-type is reserved for "runnable" javascript documents(http://www.rfc-editor.org/rfc/rfc4329.txt). Instead, we must use "application/json" which is reserved for data exchange in json format(https://www.ietf.org/rfc/rfc4627.txt). Hazelcast codebase does not depend on this Content-Type header. I also checked cluster.sh file. It does not rely on Content-Type either. This should be considered a breaking change however I don't think it will have any impact on existing customers.

This change is done to correctly support Json over Rest without having multiple mime types served for json documents.

Rest API used `application/javascript` "Content-Type" header to respond with json documents. This mime-type is reserved for "runnable" javascript documents(http://www.rfc-editor.org/rfc/rfc4329.txt). Instead, we must use "application/json" which is reserved for data exchange in json format(https://www.ietf.org/rfc/rfc4627.txt). Hazelcast codebase does not depend on this Content-Type header. I also checked cluster.sh file. It does not rely on Content-Type either. This should be considered a breaking change however I don't think it will have any impact on existing customers.

This change is done to correctly support Json over Rest without having multiple mime types served for json documents.
@mustafaiman

This comment has been minimized.

Copy link
Contributor Author

mustafaiman commented May 2, 2019

Thanks for reviews!

@mustafaiman mustafaiman merged commit 5513c63 into hazelcast:master May 2, 2019
1 check passed
1 check passed
default Test PASSed.
Details
@mustafaiman mustafaiman deleted the mustafaiman:change-mime-type branch May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.