Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-4385

Response already committed on Google App Engine when serving blobs

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.7.4, 1.8-beta-1
    • 1.7.5, 1.8-beta-2
    • Groovlet / GSP
    • 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.

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            guillaume Guillaume Sauthier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: