I just realized that we can't move the assignFinalContentType call out of the XSLTransform as you need to know the final content type specified (if there was one).

What about also adding a specific check for this case to the getNextStep() method.
Something like:

if (this.nextTransform >= this.transformCount)
{
if (this.transformCount == 0)
this.getRealResponse().setContentType(UNFINISHED_CONTENTTYPE);

this.log.debug("...which is the LastStep");
return new LastStep(this);
}

-- Mike

On Tuesday, February 18, 2003, at 03:09 PM, Mike Moulton wrote:

Jeff,

A while back I noticed that if you specify a maxTransform=0 the content type is not set. I patched my version but never submitted anything to ya as I forgot. Now I'm upgrading to the latest mav and have re-encountered the problem.

The problem lies @ line 189-193 in MaverickContext.java

if (this.nextTransform >= this.transformCount)
{
this.log.debug("...which is the LastStep");
return new LastStep(this);
}

When maxTransforms is set to 0 this block is executed without ever executing a XSLTransform object first. Right now the content type is set in two places within the nested Step class in XSLTransform. It seems to me that the problem can be solved if we move the 'assignFinalContentType()' calls out of the XSLTransform class and into the getNextStep() method in MaverickContext.

Do you see any problems with doing this? Do you want me to make the changes and submit the patch?

-- Mike



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
[INVALID FOOTER]

Reply via email to