本文介绍了通过Apache写入错误内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我流出来的数据(有时PNG,时而JSON,有时XML)和我碰到下面的错误在Chrome中:

I am streaming out data (sometimes png, sometimes json, sometimes xml) and I get the following error in Chrome:

Error 321 (net::ERR_INVALID_CHUNKED_ENCODING): Unknown error.

在Apache是​​不是在我的 Tomcat Web应用程序的面前我没有得到这个错误的(servlet的),只有当我将其部署到运行Apache我们的测试环境。

I do not get this error when apache is not in front of my Tomcat web application (servlet), only when I deploy it to our test environment which has apache running.

推荐答案

我到处找一个回答这个问题,我要在这里把答案是:

I've looked everywhere for an answer to this question, I'm going to put the answer here:

头项:

Transfer-Encoding:chunked, chunked

当响应通过Apache返回

造成这个错误。没有阿帕奇在前面一切正常。

was causing this error when the response was returned through Apache. Without Apache in front everything worked fine.

应该是:
传输编码:分块

Should be:Transfer-Encoding:chunked

这篇关于通过Apache写入错误内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 04:28