Details

    • Similar Issues:
      Show 10 results 

      Description

      streaming responses from rack middlewares seems to get buffered.

      when i run the following SSE rack app: https://gist.github.com/1497500

      and request it by:

      curl -N http://localhost:8080/eventstream/jada

      it gives nothing until you've sent about 35440 bytes..

        Activity

        Hide
        Carl Hörberg
        added a comment -

        i checked the code, it doesn't seems like torquebox is buffering anything, but maybe the ServletResponse does?

        http://docs.oracle.com/javaee/6/api/javax/servlet/ServletResponse.html

        strong indicators are methods like flushBuffer and getBufferSize

        Show
        Carl Hörberg
        added a comment - i checked the code, it doesn't seems like torquebox is buffering anything, but maybe the ServletResponse does? http://docs.oracle.com/javaee/6/api/javax/servlet/ServletResponse.html strong indicators are methods like flushBuffer and getBufferSize
        Hide
        Carl Hörberg
        added a comment -
        Show
        Carl Hörberg
        added a comment - Fixed in https://github.com/torquebox/torquebox/pull/63
        Hide
        Benjamin Browning
        added a comment -

        Slating for fix in 2.0.0beta3

        Show
        Benjamin Browning
        added a comment - Slating for fix in 2.0.0beta3
        Hide
        Carl Hörberg
        added a comment - - edited

        my fix is kind of unobtrusive as it only flushes the response if it's a chunked transfer encoding.

        the fix also suppresses "client abort" exceptions as these are common (and harmless).

        the fix is heavily inspired by jruby-rack (https://github.com/jruby/jruby-rack/blob/master/src/main/ruby/jruby/rack/response.rb#L100)

        Show
        Carl Hörberg
        added a comment - - edited my fix is kind of unobtrusive as it only flushes the response if it's a chunked transfer encoding. the fix also suppresses "client abort" exceptions as these are common (and harmless). the fix is heavily inspired by jruby-rack ( https://github.com/jruby/jruby-rack/blob/master/src/main/ruby/jruby/rack/response.rb#L100 )
        Show
        Benjamin Browning
        added a comment - Pull request merged in https://github.com/torquebox/torquebox/commit/69b89ee02f41aadebe873053dd0f483d1a3efaae Thanks!
        Hide
        Carl Hörberg
        added a comment -

        Thank you!

        Show
        Carl Hörberg
        added a comment - Thank you!

          People

          • Assignee:
            Benjamin Browning
            Reporter:
            Carl Hörberg
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: