Hi Monika,
> There appears to be a problem with last modified handling of bitstreams
>
> For the bitstream
> http://scholars.indstate.edu/bitstream/10484/108/1/Yazvac.pdf
> the last modified is reported as Thu, 06 Jan 2011 17:54:26
>
> but requesting the stream with
> curl -z 'Thu, 06 Jan 2011 17:54:26 GMT'
> http://scholars.indstate.edu/bitstream/10484/108/1/Yazvac.pdf
> returns the bitstream itself
>
> curl realizes that the bitstream is unchanged when doing (date + 1second)
> curl -z 'Thu, 06 Jan 2011 17:54:27 GMT'
> http://scholars.indstate.edu/bitstream/10484/108/1/Yazvac.pdf
>
> I found the same behavior for a bitstream from another DSPACE instance:
> http://smartech.gatech.edu/bitstream/handle/1853/32992/museum_program.pdf?sequence=3
>
> It seems that the servlet may compare last modified dates with >= instead of
> >
> Where can I check/fix this ?
Take a look in:
-
dspace-jspui/dspace-jspui-api/src/main/java/org/dspace/app/webui/servlet/BitstreamServlet.java
And look for the following code:
// Check for if-modified-since header
long modSince = request.getDateHeader("If-Modified-Since");
if (modSince != -1 && item.getLastModified().getTime() < modSince)
{
// Item has not been modified since requested date,
// hence bitstream has not; return 304
response.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
return;
}
That might be the bit to check.
Last modified date for an item is based on the last date that the item was
modified (e.g. metadata updated, new file uploaded).
Thanks,
Stuart Lewis
Digital Development Manager
Te Tumu Herenga The University of Auckland Library
Auckland Mail Centre, Private Bag 92019, Auckland 1142, New Zealand
Ph: +64 (0)9 373 7599 x81928
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech