cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <>
Subject RE: How to implement byte range support?
Date Fri, 31 May 2002 14:58:40 GMT
> From: Stuart Roebuck []
> I really need to get byte range support working in Cocoon 2 with the
> ResourceReader as it appears  that some audio players just will not
> accept MP3 files if the server does not provide byte-range support
> Windows Media Player) even after I patched Cocoon 2.0.2 to no longer
> advertise byte-range support (e.g. change the Accept-Ranges:bytes
> to Accept-Ranges:none). I have a site which is using Cocoon based
> control mechanisms to deliver the files so I can't easily serve the
> files from a non-Cocoon based server.
> I would appreciate some advice on how best to tackle this...
> I presume that I could try adding support directly into
> but I would have to disable the CachingStreamPipeline or add the range
> data into the cache key - otherwise a partial output would be cached
> rather than the whole file.  However, adding the range to the cache
> might significantly reduce the hit rate and rapidly fill the cache.
> The more favorable approach, assuming that I'm on the write track,
> be to add support to the Pipeline so that the generator (the
> ResourceReader in this case) would act as normal, and the
> CachingOutputStream would cache the entire Resource, but the
> CachingStreamPipeline and StreamPipeline would both be altered to
> only the request byte ranges.
> Do any of these suggestions seem sensible or is this more complex than
> I'm imagining?
> (I would prefer to change 2.0.2 rather than move the live site to a
> recent non-release version.)

If you want to stay with 2.0.x, which is totally understandable... I
would suggest to create ByterangeResourceReader which will advertise and
implement byte range support, and will return 0 in getLastModified() to
disable caching.


> Thanks,
> Stuart.
>             Public Key - 1024D/88DD65AF 2001-11-23 Stuart Roebuck
>       Key fingerprint = 89D9 E405 F8B1 9B22 0FA2  F2C1 9E57 5AB1 88DD
> Stuart Roebuck
> Systems Architect                             Java, XML, MacOS X, XP,
> etc.

To unsubscribe, e-mail:
For additional commands, email:

View raw message