gpt4 book ai didi

apache - 为 Apache Tomcat 6 启用状态代码 206

转载 作者:行者123 更新时间:2023-11-28 22:03:25 25 4
gpt4 key购买 nike

我想通过 HTML5 video 标签播放我的 webapp 文件夹中的一些 mp4 和 webm 视频文件。

但我遇到的问题是 tomcat 的状态码只有 200:

Request URL:http://localhost:8080/resources/1.mp4
Request Method:GET
Status Code:200 OK

但是当我从 apache 网络服务器执行相同操作时,我将获得状态代码 206:

Request URL:http://localhost/1.mp4
Request Method:GET
Status Code:206 Partial Content

是否可以激活 apache tomcat 的代码 206。默认情况下,在 web.xml 中,useAcceptRanges 为 [true]。

感谢您的帮助。

最佳答案

您需要自己实现 HTTP 范围支持。参见 this ,几乎相同的问题/答案。

关于apache - 为 Apache Tomcat 6 启用状态代码 206,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13627949/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com