exoscale / cs

A simple, yet powerful CloudStack API client for python and the command-line.
BSD 3-Clause "New" or "Revised" License
88 stars 36 forks source link

API response content type text/javascript from CS 4.5 not accepted #87

Closed onitake closed 5 years ago

onitake commented 5 years ago

python-cs 2.5.3 no longer works with our Cloudstack installation due to the new response content type check introduced in 69077c56dd40eac6d85190c85c4b06f5eb1bc01a .

Instead of application/json, Cloudstack 4.5 seems to return text/javascript. While this isn't completely right, there is no reason why text/javascript should be considered invalid in this context.

Please add text/javascript to the list of supported response content types.

greut commented 5 years ago

@onitake indeed, my bad.

greut commented 5 years ago

for the record, if this is right it performs a SQL query for that :)

https://github.com/apache/cloudstack/blob/17c164d59a218675f25f1faf583260032e535d80/server/src/main/java/com/cloud/api/ApiServer.java#L238

onitake commented 5 years ago

Wow, that's really weird indeed. I'm not entirely sure where this value came from in our environment, and if changing it is wise. But I'll keep it in mind when we upgrade. text/javascript has been deprecated for a long time.