ConcatProxyServlet sets the HTTP response status after writing the response
Review Request #3006 - Created Dec. 4, 2011 and submitted
After we return from doFetchConcatResources(..) we set the status in doGet. So lets say we return false from doFetchConcatResources and the content written to the response was bigger than the buffer. This means we will flush the buffer and set the status to the OK status then write the rest of the content and set the status to bad request, but it will be to late we already set the status to OK
Ran unit tests and rendered gadgets in common container
Posted (Dec. 5, 2011, 7:15 p.m.)
In doFetchConcatResources, if one of the 2nd through nth requests encounters an error such that false would be returned, we still have the content from the 1st up to the failing request in the VerbatimConcatOutputStream, and when we do the close on that stream, it will be written out as well as the the 400 error code. Seems like the cases where that might occur are probably remote, and having extra data in the response shouldn't matter. Not sure that it needs to be fixed .. just pointing it out.