Phil Shafer wrote:

I'm seeing an error when I use <xsl:import>s containing
cocoon: sources. During processing of the import sources,
ResourceReader.processStream() calls:

response.setHeader("Content-Length", Long.toString(contentLength));

But the response referenced is the _original_ (external)
http request, not some internal one.

The result is that if cocoon:source has a length that
is less than that of the request, the response is
truncated.

Has anyone seen this? Bugzilla didn't have anything appropriate.

The handling of sources in XSLTProcessorImpl is fairly
new code, right? Should it be doing something more than just:

xslSource = resolver.resolveURI(href);

like consing up a request/response?


It's not concern of the resolver's user to fiddle with request / response. If change to be made, it should be done in cocoon source implementation.



Or is the problem really just
that setHeader shouldn't be called (unconditionally)?


I think reader has a right to make this call unconditionally.


PS Are you using reader to deliver xsl:import parts? Have you tried generate/serialize pair, which does work?

Vadim




Reply via email to