违法304 HTTP响应? [英] Illegal 304 HTTP response?

查看:544
本文介绍了违法304 HTTP响应?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,这是一个有趣的问题,我不知道,甚至从哪里开始寻找在这一个。我已经写在C#列出在线广告的MVC3应用程序。在主页上,它显示已放置的照片最近10个广告列表。看看在Chrome页面。在第一个页面加载,它加载就好了。现在,按F5键。它将继续显示在浏览器选项卡中的加载指示器,如果你向下滚动,2或广告图片的3显示不出来。奇怪的是,它总是在页面(也许是第6,第7或第8图像)的同一地区图像。这是从来没有的前几个和它从来都不是最后的。

So this is an interesting problem and I'm not sure even where to start looking on this one. I have an MVC3 application written in C# that lists online advertisements. On the home page, it displays a list of the 10 most recent ads that have been placed with photos. Take a look at this page in Chrome. On the first page load, it loads just fine. Now hit F5. It will continue to show the "loading" indicator in the browser tab and if you scroll down, 2 or 3 of the ad images don't show up. The odd thing is that it's always images in the same area of the page (maybe the 6th, 7th or 8th image). It's never the first few and its never the last ones.

这只是发生在Chrome,只有当你点击F5。如果你点击顶部(您重定向到主页)的Equispot标志它工作得很好。

This only happens in Chrome and only when you hit F5. If you click on the "Equispot" logo at the top (which redirects you to the home page) it works just fine.

有没有人有任何想法可能会导致这或如何解决此

Does anyone have any idea what might be causing this or how to troubleshoot this?

修改:我想我可能会在某个地方得到。菲德勒表示上不显示图像500错误。这是错误:

EDIT: I think I might be getting somewhere. Fiddler indicates a 500 error on the images that are not displaying. This is the error:

[提琴手]响应头解析失败。
这可通过前面的重复使用的服务器上socket--例如,一个HTTP / 304响应该非法包含体。

由于我的所有图像缓存,并有前丢失的图像几个304的反应,这似乎是一个可能的罪魁祸首。不知道如何处理的修复,虽然,因为这对我来说是陌生的领域。

Since all my images are cached and there are several 304 responses prior to the missing images, this seems like a likely culprit. Not sure how to approach a fix though as this is unfamiliar territory for me.

推荐答案

发现问题。我这是增加不必要的字节缓存的图像响应FileCache属性。删除了,问题解决了本身和控制器现在返回0字节304的响应。

Found the problem. I had a FileCache attribute that was adding unnecessary bytes to the response for cached images. Removed that and the problem resolved itself and the controller is now returning 0 byte 304 responses.

这篇关于违法304 HTTP响应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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