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

Response already committed on Google App Engine when serving blobs

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.7.4, 1.8-beta-1
    • Fix Version/s: 1.7.5, 1.8-beta-2
    • Component/s: Groovlet / GSP
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: