You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Stuart Roebuck <st...@adolos.co.uk> on 2002/05/31 16:42:10 UTC
How to implement byte range support?
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 (e.g.
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 header
to Accept-Ranges:none). I have a site which is using Cocoon based access
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 ResourceReader,
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 key
might significantly reduce the hit rate and rapidly fill the cache.
The more favorable approach, assuming that I'm on the write track, would
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 return
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 more
recent non-release version.)
Thanks,
Stuart.
Public Key - 1024D/88DD65AF 2001-11-23 Stuart Roebuck (Adolos)
Key fingerprint = 89D9 E405 F8B1 9B22 0FA2 F2C1 9E57 5AB1 88DD 65AF
-------------------------------------------------------------------------
Stuart Roebuck stuart.roebuck@adolos.com
Systems Architect Java, XML, MacOS X, XP,
etc.
ADOLOS <http://www.adolos.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: POI Serializer - IE 6.0 and MS Excel 2000
Posted by Denis Thierry <de...@aic-info.com>.
Thanks a lot Michael,
I'll try to get this from microsoft and i'll post it!
Regards,
Denis
----- Original Message -----
From: Michael Hartle
To: cocoon-dev@xml.apache.org
Sent: Friday, May 31, 2002 6:51 PM
Subject: Re: POI Serializer - IE 6.0 and MS Excel 2000
Denis Thierry wrote:
>Hi all,
>
>I'm actually using cocoon to generate report as MS Excel doc and I do
>expirience a strange behaviour. The produced files is sometime opened within
>IE 6.0 and sometime outside (eg MS Ecel standalone). Is there any logic
>behind? Genereated files are ont big at all (about few 10ko ...).
>Does anybody already experienced it?
>
I had the case that on one machine (NT), it opened within IE and on
another (Win2K) it opened seperately; a collegue found out that there is
an option in IE (can't remember its name) to regulate that; the
different behaviour of IE on different plattforms is due to different
presets depending on the OS :/
>Denis
>
>
Best regards,
Michael Hartle,
Hartle & Klug GbR
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: POI Serializer - IE 6.0 and MS Excel 2000
Posted by Michael Hartle <mh...@hartle-klug.com>.
Denis Thierry wrote:
>Hi all,
>
>I'm actually using cocoon to generate report as MS Excel doc and I do
>expirience a strange behaviour. The produced files is sometime opened within
>IE 6.0 and sometime outside (eg MS Ecel standalone). Is there any logic
>behind? Genereated files are ont big at all (about few 10ko ...).
>Does anybody already experienced it?
>
I had the case that on one machine (NT), it opened within IE and on
another (Win2K) it opened seperately; a collegue found out that there is
an option in IE (can't remember its name) to regulate that; the
different behaviour of IE on different plattforms is due to different
presets depending on the OS :/
>Denis
>
>
Best regards,
Michael Hartle,
Hartle & Klug GbR
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
POI Serializer - IE 6.0 and MS Excel 2000
Posted by Denis Thierry <de...@aic-info.com>.
Hi all,
I'm actually using cocoon to generate report as MS Excel doc and I do
expirience a strange behaviour. The produced files is sometime opened within
IE 6.0 and sometime outside (eg MS Ecel standalone). Is there any logic
behind? Genereated files are ont big at all (about few 10ko ...).
Does anybody already experienced it?
Denis
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: How to implement byte range support?
Posted by Stuart Roebuck <st...@adolos.co.uk>.
On Friday, May 31, 2002, at 03:58 PM, Vadim Gritsenko wrote:
>> From: Stuart Roebuck [mailto:stuart.roebuck@adolos.co.uk]
>>
>> 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
> (e.g.
>> 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
> header
>> to Accept-Ranges:none). I have a site which is using Cocoon based
> access
>> 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
> ResourceReader,
>> 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
> key
>> might significantly reduce the hit rate and rapidly fill the cache.
>>
>> The more favorable approach, assuming that I'm on the write track,
> would
>> 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
> return
>> 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
> more
>> 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.
>
> Vadim
Thanks for the quick response - ByterangeResourceReader is underway!
Stuart.
Public Key - 1024D/88DD65AF 2001-11-23 Stuart Roebuck (Adolos)
Key fingerprint = 89D9 E405 F8B1 9B22 0FA2 F2C1 9E57 5AB1 88DD 65AF
-------------------------------------------------------------------------
Stuart Roebuck stuart.roebuck@adolos.com
Systems Architect Java, XML, MacOS X, XP,
etc.
ADOLOS <http://www.adolos.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
RE: How to implement byte range support?
Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Stuart Roebuck [mailto:stuart.roebuck@adolos.co.uk]
>
> 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
(e.g.
> 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
header
> to Accept-Ranges:none). I have a site which is using Cocoon based
access
> 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
ResourceReader,
> 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
key
> might significantly reduce the hit rate and rapidly fill the cache.
>
> The more favorable approach, assuming that I'm on the write track,
would
> 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
return
> 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
more
> 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.
Vadim
> Thanks,
>
> Stuart.
>
>
> Public Key - 1024D/88DD65AF 2001-11-23 Stuart Roebuck
(Adolos)
> Key fingerprint = 89D9 E405 F8B1 9B22 0FA2 F2C1 9E57 5AB1 88DD
65AF
>
------------------------------------------------------------------------
-
> Stuart Roebuck
stuart.roebuck@adolos.com
> Systems Architect Java, XML, MacOS X, XP,
> etc.
> ADOLOS
<http://www.adolos.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org