.net - HttpWebRequest not returning response stream when cache hit, and AllowAutoRedirect == false -
I have an HttpWebRequest that I have set cache policy to cachefifs, and I have set AllowAutoRedirect to false. Now when there is a cash hit, then HTTP Webbance. Position == Nodified, and no reaction stream. I should know what the cached response is!
If I set a bypass cache to cash policy then it works fine. But I need to cache these results.
How can I get a cached response in case of a cash hit?
It turns out that the problem is that I'm setting HttpWebRequest.IfModifiedSince (for myself) Was there. Yes, the recipient is always set to return the date time for that property. Now, unless it is clearly set. Therefore: request.IfModifiedSince = request.IfModifiedSince; There is no safe no-op, it actually sets a flag that is actually being sent from I-Modified-HTTP HTTP, which was the reason for my grief.
Comments
Post a Comment