这个问题好像几天前没有任何代码更改就开始了,我的本地tomcat服务器就会停止响应。
我的主过滤器断点没有被击中,只有一些资源被加载。
那些失败的,似乎有重复的响应标题:
Accept-Ranges:bytes
Accept-Ranges:bytes
Content-Disposition:inline;filename="online-framework.js"
Content-Disposition:inline;filename="online-framework.js"
Content-Encoding:gzip
Content-Encoding:gzip
Content-Range:bytes 0-42062/42063
Content-Range:bytes 0-42062/42063
Content-Type:application/javascript
Content-Type:application/javascript
Date:Tue, 19 Apr 2016 13:01:18 GMT
ETag:online-framework.js_42063_1461060446000
ETag:online-framework.js_42063_1461060446000
Expires:Tue, 26 Apr 2016 13:01:19 GMT
Expires:Tue, 26 Apr 2016 13:01:19 GMT
Last-Modified:Tue, 19 Apr 2016 10:07:26 GMT
Last-Modified:Tue, 19 Apr 2016 10:07:26 GMT
Server:Apache-Coyote/1.1
Server:Apache-Coyote/1.1
Transfer-Encoding:chunked
Transfer-Encoding:chunked
Vary:Accept-Encoding
Vary:Accept-Encoding
Chrome停止并显示错误:Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING
,这是有道理的。
tomcat连接器尚未修改,并且包含gzip响应。我试过了什么:
页面似乎永远加载。这是踢球者,它是随机发生的,它会开始工作一小时而不是下一小时。
我唯一可以理解的是,某些域名可能已经改变,没有Windows更新运行,3或4个其他PC执行相同的操作,而其他2个没有(相同版本)
我不知道下一步该去哪儿?有什么想法吗?
答案 0 :(得分:2)
好的,在这里回答我自己的问题,但我找到了解决方案。
我使用file servlet撰写的自定义@BalusC;问题在于其中
以下是我的发现:
Content-Encoding: gzip
和Content-Range
ERR_INCOMPLETE_CHUNKED_ENCODING
DefaultServlet
处理它...问题消失了 Content-Range
的规范还指出:
Content-Range实体标头与部分实体主体一起发送,以指定应在整个实体主体中应用部分主体的位置。范围单位在3.12节中定义。
在代码中,即使是完整的响应,也会发送它:
if (ranges.isEmpty() || ranges.get(0) == full) {
// Return full file.
Range r = full;
response.setContentType(contentType);
response.setHeader("Content-Range", "bytes " + r.start + "-" + r.end + "/" + r.total);
if (content) {
// .....
我删除了那一行,一切都开始了!我真的希望有人能够参与其中并可能提供更好的解释。
以下是失败文件的chrome://net-internals/
输出:
t= 3740 [st= 38] -HTTP_STREAM_REQUEST t= 3740 [st= 38] +HTTP_TRANSACTION_SEND_REQUEST [dt=0] t= 3740 [st= 38] HTTP_TRANSACTION_SEND_REQUEST_HEADERS --> GET /Core/resources/scripts/scriptaculous/dragdrop.js?t=1461139610 HTTP/1.1 Host: localhost:8080 Connection: keep-alive Pragma: no-cache Cache-Control: no-cache Accept: */* User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36 DNT: 1 Referer: http://localhost:8080/Core/Dashboard?componentID=VCmq3c Accept-Encoding: gzip, deflate, sdch Accept-Language: en-US,en;q=0.8,af;q=0.6 Cookie: [306 bytes were stripped] t= 3740 [st= 38] -HTTP_TRANSACTION_SEND_REQUEST t= 3740 [st= 38] +HTTP_TRANSACTION_READ_HEADERS [dt=4] t= 3740 [st= 38] HTTP_STREAM_PARSER_READ_HEADERS [dt=4] t= 3744 [st= 42] HTTP_TRANSACTION_READ_RESPONSE_HEADERS --> HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Disposition: inline;filename="dragdrop.js" Accept-Ranges: bytes ETag: dragdrop.js_19250_1461136271305 Last-Modified: Wed, 20 Apr 2016 07:11:11 GMT Expires: Wed, 27 Apr 2016 08:06:51 GMT Content-Range: bytes 0-19249/19250 Content-Type: application/javascript Transfer-Encoding: chunked Vary: Accept-Encoding Date: Wed, 20 Apr 2016 08:06:50 GMT t= 3744 [st= 42] -HTTP_TRANSACTION_READ_HEADERS t= 3744 [st= 42] HTTP_CACHE_WRITE_INFO [dt=56] t= 3800 [st= 98] HTTP_CACHE_WRITE_DATA [dt=0] t= 3800 [st= 98] HTTP_CACHE_WRITE_INFO [dt=1] t= 3801 [st= 99] URL_REQUEST_DELEGATE [dt=0] t= 3801 [st= 99] -URL_REQUEST_START_JOB t= 3801 [st= 99] URL_REQUEST_DELEGATE [dt=0] t= 3801 [st= 99] HTTP_TRANSACTION_READ_BODY [dt=0] t= 3801 [st= 99] HTTP_CACHE_WRITE_DATA [dt=1] t= 3802 [st= 100] URL_REQUEST_JOB_BYTES_READ --> byte_count = 3683 t= 3802 [st= 100] HTTP_TRANSACTION_READ_BODY [dt=0] t= 3802 [st= 100] HTTP_CACHE_WRITE_DATA [dt=0] t= 3802 [st= 100] URL_REQUEST_JOB_BYTES_READ --> byte_count = 13982 t= 3802 [st= 100] HTTP_TRANSACTION_READ_BODY [dt=20365] --> net_error = -355 (ERR_INCOMPLETE_CHUNKED_ENCODING) t=24167 [st=20465] FAILED --> net_error = -355 (ERR_INCOMPLETE_CHUNKED_ENCODING) t=24168 [st=20466] -REQUEST_ALIVE --> net_error = -355 (ERR_INCOMPLETE_CHUNKED_ENCODING)
最后,这里有一些真正帮助我的链接,看起来Spring去年也有同样的问题。
我仍然无法弄清楚为什么这种情况在经过多年的运行后随机启动,并且真的感谢任何输入。