Can't set Content-length header for POST method
We had this problem for a开发者_如何转开发 while, just this morning I was able to set Content-length header for POST method, but now it doesn't work anymore. Why is it? I haven't done anything, I heard that this is restricted but I could use it just fine yesterday:
request.Headers["Content-Length"] = byteArray.Length.ToString();
In Silverlight 3 / WP 7.0 you can't set the Content-Length header, this is done for you by the http stack.
Silverlight 4 / (WP 7.1 ?) has a ContentLength
property but you would only set is when using the ClientHTTP stack with the AllowWriteStreamBuffering
set to false.
精彩评论