Enforce content-type
The freezer-api currently does NOT enforce the http field content-type. All openstack projects I checked, expect the content-type to be present.
Example:
-------
curl -X POST http://
{
"auth": {
"identity": {
],
}
}
}
}
}
"
{"error": {"message": "Expecting to find application/json in Content-Type header - the server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error.", "code": 400, "title": "Bad Request"}}
-------
A similar blueprints from our neighbors: https:/
Please note that this will break api compatibility. I'm not aware of any clients outside the freezer project using this api but we need to be careful.
Affected components
==================
Clients:
- freezer-web-ui
- python-
- freezer-scheduler
I believe most of them are based on the freezer/apiclient code so changing this code should be enough. Are there any other clients I'm not aware of?
Server:
- freezer-api
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Jonas
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Enforce content-type in request headers