I have installed rack 1.0.1 gem and it return error on every POST request.
The problem is in rack-1.0.1/lib/rack/handler/lsws.rb :
in rack 1.0.0 it was something like this:
after this change post request works again but i think lsws should check why it won't works with RewindableInput with is default for other handlers (exemple: fastcgi)
Here is error:
UPDATE:
RewindableInput class require IO as arg but in lsws.rb it passed $stdin.read.to_s also passing $stdin don't works but if we write
All works correct.
The problem is in rack-1.0.1/lib/rack/handler/lsws.rb :
Code:
19: rack_input = RewindableInput.new($stdin.read.to_s)
Code:
rack_input = StringIO.new($stdin.read.to_s)
Here is error:
Code:
/!\ FAILSAFE /!\ Fri Oct 23 11:04:07 +0200 2009
Status: 500 Internal Server Error
undefined method `read' for #<String:0x47c7b68>
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/rewindable_input.rb:83:in `make_rewindable'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/rewindable_input.rb:26:in `read'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/rewindable_input.rb:11:in `method_missing'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/request.rb:134:in `POST'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/methodoverride.rb:15:in `call'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/params_parser.rb:15:in `call'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/rewindable_input.rb:25:in `call'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/session/cookie_store.rb:93:in `call'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/cache/strategy/local_cache.rb:24:in `call'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/failsafe.rb:11:in `call'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `synchronize'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/dispatcher.rb:106:in `call'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/rack/static.rb:31:in `call'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/lsws.rb:34:in `serve'
/opt/ruby-enterprise-1.8.7-20090928/lib/ruby/gems/1.8/gems/rack-1.0.1/lib/rack/handler/lsws.rb:9:in `run'
RewindableInput class require IO as arg but in lsws.rb it passed $stdin.read.to_s also passing $stdin don't works but if we write
Code:
rack_input = RewindableInput.new StringIO.new($stdin.read.to_s)
Last edited: