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 case sensitivity #1572

Closed
lijjhaha opened this issue Jun 28, 2020 · 1 comment
Closed

Content-type case sensitivity #1572

lijjhaha opened this issue Jun 28, 2020 · 1 comment

Comments

@lijjhaha
Copy link

lijjhaha commented Jun 28, 2020

Some website resonding with the "content-type" which is not normalized, such as "Text/HTML"。

As expected, the text content should be parsed by the "text parser",but "Text" can't be recognized, so,none of parser is called.

Should add a line of code, as below( node/index.js) :
var max = _this4._maxRedirects;
var mime = utils.type(res.headers['content-type'] || '') || 'text/plain';
var type = mime.split('/')[0];
if (type) type = type.toLowerCase();

@niftylettuce
Copy link
Collaborator

This will go out in the v6.0.0 release later today.

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