1

I have a Django View that receives SOAP Request and I return back a SOAP Response (content_type='text/xml')

The client that sends the request(ORACLE OSB) sends me a SOAP Envelope but for some reason the request.body was empty, when i receive this request using Django Test Server.

I logged the request object and it is pasted at http://dpaste.com/0XD485E What i noticed is that CONTENT_LENGTH has no value.

I read about this in HTTP 1.1 RFC http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.4 and it says that

"If a message is received with both a Transfer-Encoding header field and a Content-Length header field, the latter MUST be ignored."

RFC also mentions that

"All HTTP/1.1 applications that receive entities MUST accept the "chunked" transfer-coding (section 3.6), thus allowing this mechanism to be used for messages when the message length cannot be determined in advance."

I also tried this with Apache but Apache/mod_wsgi did not even let the request come to the Django view but a HTTP 411 Error was returned.

What is the best way to get out of this scenario?

Guddu
  • 1,588
  • 4
  • 25
  • 53

1 Answers1

1

This solved problem in my case:

  1. Add "WSGIChunkedRequest On" to your sites.conf
  2. Enable mod_proxy with "sudo a2enmod proxy" and "sudo a2enmod proxy_http"
  3. Finally follow this SO thread for rest of solution: Processing chunked encoded HTTP POST requests in python (or generic CGI under apache)

  4. (Reload Apaches config and restart Apache.)

Community
  • 1
  • 1
Tumbe
  • 46
  • 5