Uploaded image for project: 'TorqueBox'
  1. TorqueBox
  2. TORQUE-1081

TorqueBox Stomp rack handler breaks on Ruby 1.9 because it does not follow the Rack spec

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.3.1
    • Component/s: None
    • Labels:
    • Steps to Reproduce:
      Hide

      Run TorqueBox in Ruby 1.9 mode, add the `TorqueBox::Stomp::StompJavascriptClientProvider` middleware. Visit `http://localhost:8080/stilts-stomp.js`. This results in a NoMethodError.

      Show
      Run TorqueBox in Ruby 1.9 mode, add the `TorqueBox::Stomp::StompJavascriptClientProvider` middleware. Visit ` http://localhost:8080/stilts-stomp.js `. This results in a NoMethodError.

      Description

      `File.read` returns a String. String does not respond to `#each` and is therefore not a valid response body for a rack response. The Rack spec makes this clear:

      > The Body must respond to each and must only yield String values. The Body itself should not be an instance of String, as this will break in Ruby 1.9.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                benbrowning Benjamin Browning
                Reporter:
                jnicklas Jonas Nicklas
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: