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

不应允许非标准的 Content-Type #5

Closed
skyline75489 opened this issue Dec 19, 2016 · 1 comment
Closed

不应允许非标准的 Content-Type #5

skyline75489 opened this issue Dec 19, 2016 · 1 comment

Comments

@skyline75489
Copy link

https://github.com/kangzubin/XMNetworking/blob/master/XMNetworking/Core/XMEngine.m#L381

这里放宽了对于 Content-Type 的限制,不知意义何在?如果仅仅是为了好用的话,感觉是没有必要的。

@kangzubin
Copy link
Owner

您说得很对,之前之所以加上 "text/html", "text/plain" 是因为历史遗留问题很多 Server 端的 API 返回了 JSON 数据但是 Content-Type 却不是标准的 "application/json",所以这里做了兼容处理;

接下来会考虑让使用者可按需求自定义修改可接收的 Content-Type 类型。

kangzubin pushed a commit that referenced this issue Dec 27, 2016
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

2 participants