What I actually return is a DefaultHttpHeaders with a 404 set.
getImage() returns an empty (not null) inputstream since there's no
content for the body.

I'll do some debugging when I get time and see where it's failing. It
certainly seems to be StreamResult that has the issue.

Thanks

Mike

2008/7/24 Jeromy Evans <[EMAIL PROTECTED]>:
> Mike Watson wrote:
>>
>> Hi folks,
>>
>> As mentioned in previous posts I'm using the REST plugin to serve
>> images and everything seems to work fine when the content exists.
>>
>> However if I return an empty inputstream to StreamResult with a 404
>> response code I get the exception below.
>> Stepping through the code the getBufferSize() method on my controller
>> is definitely called and returns a legitimate value...
>>
>
> Does this only occur when you return a null or 0 buffer size?
>
> My guess is that it's a bug in the StreamResult or the result handler.  It
> probably evaluates "${bufferSize}" and deduces that the property doesn't
> exist (because it's null/0) and uses it as a literal string value instead.
>  That's just a guess.
>
> Is it really valid to return a zero length stream result?  I would instead
> return a http status result with 404 / NullResult for the error case (ie.
> just headers, no content).
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to