允许从servlet下载Progressive? [英] Allow Progressive Download from a servlet?

查看:192
本文介绍了允许从servlet下载Progressive?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了提供多媒体数据的servlet的问题。我正试图在iPhone上的移动safari中使用它,我得到服务器未正确配置错误。我使用Mac(Apache)上的网络共享服务相同的多媒体文件,它工作正常。我开始查看HTTP heades,看看servlet是否搞乱了一个标题。我注意到Apache设置了ETag以及Accept-Range。然后我谷歌周围,了解到iPhone可以使用渐进式下载。简而言之,我认为我需要在我的servleet中启用渐进式下载,我认为ETag和Accept-Range标头是其中的一部分。我之前从未这样做过,所以我想我会问这里有没有人能指出我正确的方向。我是否需要在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?

推荐答案

看看这个文章。它创建了一个文件servlet,支持恢复下载,缓存和压缩内容。

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

这篇关于允许从servlet下载Progressive?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆