Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdditional content-type parameters are thrown away #1589
Comments
Hey @ThomWright! I believe you are correct. If we are provided a content type by the user, we should use it. We currently support specifying a According to the RFC, everything that comes after the content-type is the media-type, and we should respect the user's request for a specific media-type. The question I would have is: what effect does specifying a media-type have on the formatter for that content-type? Does the formatter need to be aware of the media-types being asked for? I think the easiest thing to do here, for the short term, is to just append the media-type back to the |
Bug Report
Restify Version
6.3.4
Node.js Version
8.9.1
Expected behaviour
Given the following code, I would expect the content-type string I set to be used.
Should produce:
For context, the content-type I'm using comes from: Prometheus client, Prometheus docs
Actual behaviour
Only the contents of the string before the first
;
are used, resulting in:Repro case
Cause
The string is split here, throwing away the rest:
node-restify/lib/response.js
Line 466 in 74e0cf5
Are you willing and able to fix this?
Maybe😄
Assuming there isn't some reason this is intended behaviour, I can have a look at fixing.