HttpModule 和旧版本的 IE
我构建了一个 http 模块来记录服务器上的文件下载。当用户下载文件时,它会将他们的 IP、文件 ID、下载时间、引荐来源网址和用户代理记录到数据库中。这在大多数情况下都工作得很好,尽管我已经不得不通过检查 Range 标头来处理由 Firefox 下载管理器插件引起的近似重复。
这并没有解决 IE6 和 IE7 用户的同样问题。当他们启动下载时,它将以毫秒为单位重复访问我的模块,并导致为单个文件记录数千个条目。旧版本的 IE 似乎不像 Firefox 那样使用范围标头,我什至不确定这就是问题所在。
任何人都对可能导致此问题的原因有任何想法,或者我应该检查哪些内容以避免记录冗余请求?
I've built an http module to log file downloads on a server. When a user downloads the file, it logs their IP, a file ID, download time, referrer, and user agent to the database. This works fine for the most part, although I've already had to deal with stripping out near-duplicates caused by download manager addons for Firefox by checking the Range header.
This hasn't solved the same problem for IE6 and IE7 users. When they initiate a download, it will repeatedly hit my module milliseconds apart and cause thousands of entries to be logged for a single file. It doesn't seem like older versions of IE are using the range header like Firefox does, and I'm not even sure that's the problem.
Anyone have any ideas as to what could be causing this, or what I should check to avoid the redundant requests from being logged?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该尝试使用 Fiddler (或类似的 Web 调试器)来查看那些特定风格的 IE 的请求发送到您的服务器。也许它正在做一些合法的事情,也许您将能够通过查看 HTTP 标头和方法来过滤掉额外的请求。
You should try using Fiddler (or a similar web debugger) to see the requests that those particular flavors of IE sends to your server. Perhaps it is doing something legitimate, and perhaps you will be able to filter out the extra requests by looking at the HTTP headers and method.