I don't know if it really matters, but I guess a contentLenght of -1 means the value is actually unknown whereas a value of 0 denotes an empty file.
Regards, Ingo > Hi Ingo, > > you are right the fix you are referring to also does the trick, I = > overlooked it. Is there a specific reason not to initialise = > contentLength to 0 instead of -1? > > Regards, > > Stijn > > -----Original Message----- > From: Ingo Brunberg [mailto:[EMAIL PROTECTED] > Sent: donderdag 18 september 2003 12:36 > To: [EMAIL PROTECTED] > Subject: Re: Bug in OracleContentStore and Fix > > > Hi Stijn, > > which current nightly snapshot are you referring to? In the current > code your line 186 actually is line 188 and there are to additional > (at 178) lines which already contain a fix for your problem. These > are: > if(contentLength < 0) > contentLength =3D 0; > > Regards, > Ingo > > > Hi, > >=20 > > based on our tests (slide 1.0.16 and current nightly snapshot) we = > found =3D > > that when using the OracleContentStore the property 'getcontentlength' = > =3D > > mismatched with the actual length of the BLOB stored in Oracle (actual = > =3D > > BLOB size is 'getcontentlength' +1). > >=20 > > The following statements in OracleContentStore causes this behaviour: > >=20 > > 135: int contentLength =3D3D -1; > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > .... > > 186: revisionDescriptor.setContentLength(contentLength); > >=20 > > OracleContentStore updates the contentLength to the (original size-1) = > =3D > > and this value is made persistent in the PROPERTY table. > >=20 > > This causes Slide to malfunction when downloading files because the = > =3D > > property 'getcontentlength' is used by GetMethod to set the =3D > > contentlength of the response. The write of the last byte throws an = > =3D > > exception and the last buffer is never flushed to the client. > >=20 > > The solution is to initialize the contentLength to 0 instead of -1. = > =3D > > After this fix everything works just fine. > >=20 > > Keep up the good work, > >=20 > > Kind regards, > >=20 > > Stijn --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
