无法加载资源:net :: ERR_CONTENT_LENGTH_MISMATCH [英] Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH

查看:7861
本文介绍了无法加载资源:net :: ERR_CONTENT_LENGTH_MISMATCH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个错误信息是什么意思,我该如何解决它?


无法加载资源:net :: ERR_CONTENT_LENGTH_MISMATCH  这是从Google Chrome v33.0的控制台,          )


  • 代理:您和您的服务器之间的任何代理都可以修改请求,而不会更新内容长度标头。

    据我所知,我在IIS中看不到这些问题,但主要是使用自定义的代码。 / p>

    让我知道这是否有帮助。


    What does this error message mean and how do I resolve it? That is from console of Google Chrome v33.0, on Windows 7.

    Failed to load resource: net::ERR_CONTENT_LENGTH_MISMATCH           http://and.img.url/here.png

    I'm trying to change the images' src attribute using jQuery. For example like this (simplified):

    $('.image-prld').attr('src', someDynamicValue);
    

    There are about 30 images on the page. And the above error is happening for random images every time when I reload the page. But sometimes it is working well for all the images, without any error.

    When this error happens, the particular image is displaying like this:

    However, when I open the link next to the error message on a new tab, the image is loading, which says me logically that the images is valid and it exists.

    解决方案

    This error is definite mismatch between the data that is advertised in the HTTP Headers and the data transferred over the wire.

    It could come from the following:

    1. Server: If a server has a bug with certain modules that changes the content but don't update the content-length in the header or just doesn't work properly. It was the case for the Node HTTP Proxy at some point (see here)

    2. Proxy: Any proxy between you and your server could be modifying the request and not update the content-length header.

    As far as I know, I haven't see those problem in IIS but mostly with custom written code.

    Let me know if that helps.

    这篇关于无法加载资源:net :: ERR_CONTENT_LENGTH_MISMATCH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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