Can django support chunked transfer encoding (in http push request) in general and when deployed on heroku?

389 views Asked by At

We have a web application written in django deployed on heroku. One of our requirements is to get XML from an external source which is pushed to our domain. The XML from the external source is pushed periodicly to a URL using a http push request, which uses chunked transfer encoding. When the push request arrives to django however, the request.body is empty! Testing this, we tried pushing the same exact request, with and without the "Transfer-encoding=chunked" in the header. The body of the request contains the XML when not using chunked, and is empty when using chunked.

From looking on the web, it seems that django doesn't support push requests which use chunked transfer encoding. This is pretty weird. It appears anything using WSGI in python doesn't?

However I see no solution or even discussion about this when using heroku. Does anyone have any experience with this? Any help or ideas about what can be done? Is there some flag which tells heroku to handle chunked transfer encoding?

The only solution I currently see is setting a different app with a framework that supports chunked transfers, or running our own webserver that will create unchunked requests from the chunked requests and redirect it to our application.

0

There are 0 answers