Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
PUP 3.7.4
-
-
Agent
-
1
-
Agent 2017-06-14
-
Bug Fix
-
Puppet will now send proper MIME content types, e.g. application/json, instead of format names, e.g. json, in its Accept header when making HTTP requests.
-
No Action
-
Check in includes tests for the change
Description
When a Puppet agent makes requests to a master, the values it uses in the Accept header do not correspond to industry-standard MIME types - although it really seems like they should.
For example, a request to the node endpoint includes:
GET /production/node/my-node?transaction_uuid=39794d9e-a0c8-4a5b-bcee-d20efa1555b5&fail_on_404=true
|
Accept: pson, b64_zlib_yaml, yaml, raw
|
For better HTTP spec compatibility, the request should look more like:
GET /production/node/my-node?transaction_uuid=39794d9e-a0c8-4a5b-bcee-d20efa1555b5&fail_on_404=true
|
Accept: text/pson, text/b64_zlib_yaml, text/yaml, application/x-raw
|
josh believes that this change would be fairly easy to make from the client side. Would need to call "model.get_format(format).mime" for each supported format to be added into the Accept header. Presumably, we'd have to have something on the server side to do the corresponding "decode" of the MIME type value back to the short-hand symbols that the server use to determine whether the client's request is valid. Not sure exactly what those changes would look like at this point.
Attachments
Issue Links
- relates to
-
PUP-7482 Agent sends wrong content-type when using http file sources
-
- Closed
-