Hello,

Am 21.12.2007 um 18:23 schrieb Blanco, Jose:

> A user has noticed that while attempting to retrieve a bitstream from
> our Dspace instance their firewall blocked the returned information  
> due
> to our system sending a duplicate "Content-length" in the http header.
> ...
> Via a perl script that makes a request for bitstreams using LWP I
> confirmed that there were two Content-length's being returned.

Yes, there should not be two headers of the same type
in one response. It might be better to have only one,
even if he specifies a wrong value or have no content-
length header at all. Question is which part of the
stack adds the header at which time. As you have this
perl script in place, a try and error approach might
be suitable. Check against other DSpace instances
until you find one that does not create duplicate
headers, then check with the owner and compare details
of you http server and JSP container (apache + tomcat
usually) configuration until you find the difference
responsible for this to happen.

According to the http protocol, headers have to be sent
before the content starts. With an app server the final
size of content might not be known at that time. The
server could be configured to produce the whole answer,
find out about size, adjust headers and send the whole
response from cache. This is usually too expensive in
terms of memory and response time and is generally not
done. It is certainly wrong to correct the header during
the response when the first guess was wrong. I guess that
e.g. apache is configured to add a header while dspace
produces his own header and adds it to the answer before
sending content. Verbose logging, debug switches and all
the common means are probably required to find out which
part of the whole stack adds the superfluous header.

Good luck, Christian


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to