Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

PIVOTAL LABS
Standup 08/04/2009: ActionController CGI extension load order

Interesting Things

  • We discovered a bug in the load order of CGI extensions in ActionController in Rails 2.3.3. The body of the first request to a Mongrel server after loading the Rails environment will appear empty, even if it’s not. The problem is the default CGI::QueryExtension#initialize_query in the Ruby standard library will read the stdinput stream and not rewind it. As a result, future reads of stdinput look empty. In Rails, this behavior is overridden in action_controller/cgi_ext/query_extension.rb. Unfortunately this file isn’t loaded until after the first request to a new server, at which point subsequent requests work normally. The Rails ticket is here.

  • The easiest fix is to require “action_controller/cgi_ext” in your environment file or an initializer file.

Comments
Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *