I have an Azure Cloud Service with WorkerRole that accepts https requests.
IT seems that Azure magic is forcing client to send Expect 100 Continue in an https request header if the payload is > 50KB.
If you send request with data less than 50KB to an Azure https endpoint the server returns the response otherwise the request is timed-out. If Expect 100 Continue is added to the request which is > 50KB the request is accepted.
Any idea why and how to disable this feature?
It's actually the client that is in control of this. Your client implementation must be sending an HTTP header like so:
Expect: 100-continue
Otherwise the server wouldn't bother replying with a 100 Continue status.
If you do not want to use this feature of HTTP/1.1 then simply stop sending the header from your client. In .NET it's turned on by default and you can turn it off for all HttpWebRequests within an AppDomain using this static property:
ServicePointManager.Expect100Continue = false;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With