btw this is a "project first" commit :-)
On Feb 13, 2012, at 1:22 PM, Julien Viet wrote:
Hi,
while using resource serving for doing Ajax, I found out that the implementation was only
handling basic resource serving (i.e a portlet that sends a stream on the response with
status 200 OK).
This is not a problem for the server but rather for the user agent which is never able to
be aware of non 200 OK responses.
I commited a fix which improves resource serving handling in other use cases:
1/ a response is always sent to the browser (previously in some case no answer was sent).
When an error occurs a 500 (internal server error) status is sent, previously nothing was
done.
2/ when a Portlet uses the ResourceResponse.HTTP_STATUS_CODE to set a status code on the
response (to allow status other than 200, for instance 404 not found) this status code is
sent to the user agent before streaming the headers and body.
This allows portlets relying on resource serving for ajax to become better http servers.
thanks
Julien
ps: I believe also that those use cases should behave correctly with WSRP. Chris could
you tell us if this use case is correctly handled ?