0

I have a RESTApi application which I have recently moved over to Microsoft Azure App-services. Earlier it was hosted on a Linux server. The issue that I am seeing is weird:

  1. When a client using ASP.net call a POST request with no body and no content-length header explicitly passed, the request fails with 411 Content-length required error. For the same client, the requests which were going on to the Linux server are still working fine.

  2. For a client using python/PHP, the same request works on both the IIS and Linux environments.

I am unable to understand why this might be happening. I have resolved the issue by sending content-length:0 for this API call but want to understand why this is happening.

nkt217
  • 21
  • 5
  • All Azure app services running behind IIS ARR, which might perform extra HTTP validation like that. It is not surprising and you can get used to that. https://help.mollie.com/hc/en-us/articles/214017925-I-use-Microsoft-IIS-and-the-webhook-prompts-a-411-Length-Required-error-message- and http://robertgreiner.com/2013/01/the-remote-server-returned-an-error-411-length-required/ – Lex Li Aug 29 '18 at 23:10
  • @LexLi, thanks for the clarification. – nkt217 Aug 30 '18 at 06:58

0 Answers0