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:
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.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.