Quantcast
Channel: FastCGI Module
Viewing all articles
Browse latest Browse all 205

Python REST API Status 201 Create - IIS Adds HTML

$
0
0

I'm using IIS with wfastcgi to serve up a flask python application. Things were going well up until the point where I tried to create new data. The JSON Rest server I'm using sends a 201 - Created Status with the location of the new item along with the object in JSON. For some reason IIS is injecting some html in the front of this response, so my JSON client web browser has an error when trying to parse the response.

Is it possible to disable this behavior in IIS where the html is injected? I have seen other answers to this and people mention "Switch to apache" or have "written an iis module". Neither of these seem like a good solution since I don't know how to write/install iis modules, and using apache imo defeats the purpose of using iis.

The problem is similar to what is mentioned here:

http://stackoverflow.com/questions/12074730/w7-pro-iis-7-5-overwrites-php-location-header-solved

http://stackoverflow.com/questions/10594225/prevent-iis-from-changing-response-when-location-header-is-present?noredirect=1&lq=1


Viewing all articles
Browse latest Browse all 205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>