开发者

Can't set Content-length header for POST method

开发者 https://www.devze.com 2023-04-02 21:58 出处:网络
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 he

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消