304 responses include Content-Type text/plain

When enabling caching with HttpClient to interact with your service all requests that are cached are failing to be parsed as JSON due to their Content-Type being text/plain instead of applicaiton/json. I think this is because octopus deploy is setting Content-Type to text/plain in the 304 responses and the cache is being updated to reflect that (or something). In Fiddler I am able to set a rule to modify the requests for our octopus server that removes the Content-Type header for 304 responses and things work fine.

Repro: https://gist.github.com/aarondandy/ee11865494c4b1ea5004

Hi Aaron,

Thanks for the report! We will look into creating a fix for this.


Any chance this is being addressed in 3.0?

Hi Drew,

Just after the 3.0 release goes stable we will be addressing outstanding bugs. We needed to focus on getting 3.0 to be 2.6 compatible.