Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.7.4, 1.8-beta-1
-
None
Description
When using the BlobstoreService from Google App Engine to serve blob content from a Groovlet, whether through direct streaming or through getting an input stream / reader over the blob content, the GAE server would complain that the response is already committed.
What "commits" the response is the calls by GroovyServlet to response.setStatusCode() and response.flushBuffer().
The former sets the default 200 status code, which is usually set by default at 200 anyway by servlet containers.
The latter is also done by servlet containers when the servlet terminates.
At least, this is what I gathered from glancing through Tomcat and Jetty sources.
So the suggested fix is to remove the call to these two methods which "commit" the response too early.