简体   繁体   中英

Enable the status code 206 for Apache Tomcat 6

I want to play some mp4 and webm video files from my webapp Folder by the HTML5 video tag.

But I have the problem that the status code with the tomcat is only 200:

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

But when I do the same from a apache webserver I will get the status-code 206:

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

Is it possible to activate the code 206 for the apache tomcat. By default in the web.xml the useAcceptRanges is [true].

Thanks for the help.

You need to implement HTTP range support yourself. See this , nearly identical question/answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM