HttpWebRequest.GetResponse对HTTP 304抛出WebException抛出、GetResponse、HttpWebRequest、HTTP

2023-09-02 10:35:34 作者:沉默的爱

当Web服务器响应 HttpWebRequest.GetResponse()用HTTP 304(未修改),的GetResponse() thows一个 WebException ,这实在是太令人不可思议了我。这是通过设计还是我缺少明显的东西在这里?

When a web server responds to HttpWebRequest.GetResponse() with HTTP 304 (Not Modified), GetResponse() thows a WebException, which is so very weird to me. Is this by design or am I missing something obvious here?

推荐答案

好了,这似乎是一个被设计的行为和的