菲德勒使得HttpWebRequest的/ HttpClient的行为意外 [英] Fiddler makes HttpWebRequest/HttpClient behaviour unexpected

查看:135
本文介绍了菲德勒使得HttpWebRequest的/ HttpClient的行为意外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是想问问,如果有人遇到使用的HttpWebRequest的问题类(甚至是新的HttpClient)尝试一些文件上传到服务器时提琴手启动时。

我也遇到了错误,即 AllowWriteStreamBuffering 属性的HttpWebRequest 类不工作时,小提琴手启动,因此上传进度是不工作的。字节不立即发送,但buffored即使我设置AllowWriteStreamBuffering为true,所以我不能跟踪上传进度。它的工作原理确定,当小提琴手没有启动。

此外,如果我收拉琴时,我的应用程序上传一些文件,它会崩溃得扔WebException它说:基础连接被关闭。在收到的发生意外的错误 >

同样的事情正在发生新的.NET 4.5 的HttpClient 类。

解决方案

抱歉的混乱;提琴手目前只支持的响应的而不是请求的流。

有些代理(如小提琴手)或其他中介机构将其发送到服务器进行性能或功能(如:病毒扫描,断点调试)的原因之前完全缓冲的请求。

http://www.fiddler2.com/fiddler/help/streaming.asp

Just wanted to ask if somebody encountered a problem of using HttpWebRequest class (or even new HttpClient) when trying upload some file to the server when Fiddler is launched.

I have encountered the bug, namely, AllowWriteStreamBuffering property of HttpWebRequest class is not working when the fiddler is launched, so upload progress is not working at all. Bytes are not sent instantly but buffored even if I set AllowWriteStreamBuffering to true, therefore I can't track upload progress. It is works ok when fiddler is not launched.

Moreover if I close fiddler when my application is uploading some file, it will crash too throwing WebException which says "The underlying connection was closed: An unexpected error occurred on a receive."

The same things is happening with new .net 4.5 HttpClient class.

解决方案

Sorry for the confusion; Fiddler currently only supports streaming of responses and not requests.

Some proxies (like Fiddler) or other intermediaries will fully buffer a request before sending it to the server for performance or functional (e.g. virus scanning, breakpoint debugging) reasons.

http://www.fiddler2.com/fiddler/help/streaming.asp

这篇关于菲德勒使得HttpWebRequest的/ HttpClient的行为意外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆