简体   繁体   中英

Allow Progressive Download from a servlet?

I'm having an issue with a servlet that delivers multimedia data. I'm trying to use it from mobile safari on the iPhone and I get the "server not configured correctly" error. I server the same multi-media file using a web share on my Mac (Apache) and it works fine. I start looking at HTTP heades to see if the servlet is messing up a header. I notice that Apache sets an ETag as well as an Accept-Range. Then I Google around and learn that the iPhone works with progressive downloads. Long story short, I think I need to enable progressive downloads in my servleet and I think the ETag and Accept-Range headers are part of it. I've never done this before so I figured I'd ask here if anyone could point me in the right direction. Do I need to implement the entire progressive download stuff in my servlet? Should I use a Filter? Where should I start?

Take a look at this article . It goes over creating a file servlet that supports resuming the download, caching and gzipping the content.

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