![]() |
Rack 1.0.1 don't works god with litespeed
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 : 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 2009RewindableInput 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) |
It is a bad idea to use both RewindableInput and StringIO. StringIO buffer the POST body in memory (in a string, bad for large post). RewindableInput buffer POST body in a temp file, which is very slow. Using both is like getting the worse part from both.
what error message do you get with rack_input = RewindableInput.new($stdin) Seems it work in my environment. |
For me it don't works well.
exemple on developemnt machine i gets exception: ActionController::InvalidAuthenticityToken on production something like no body error With StringIO all works ok. |
Same issue here ?
Hi!
I'm getting what seems to be the same error here: Code:
/var/sites/myapp/releases/20091104111639/vendor/rails/activesupport/lib/active_support/dependencies.rb:105:in `const_missing'- ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-linux] - rails 2.3.4 - rack 1.0.1 - Ubuntu 8.04.3 LTS - easy setup from litespeed Is there anyone facing the same issue currently ? Is there a recommended fix ? thanks for any hint - if there's anything I can do to help diagnose and fix the issue, please tell me. cheers, -- Thibaut |
how about try rack 1.0.0 instead of 1.0.1?
|
rack 1.0 works rack 1.0.1 works too after fix that i provided
|
hi,
thanks for the tips! Turns out things seem to work with rack 1.0.0 instead of 1.0.1. Maybe there is something to investigate for the later releases of Litespeed though - in case the change brought by 1.0.1 becomes the rule. If it helps, here are the release notes of 1.0.1. Thanks! |
I haven't tried this yet - will be trying shortly though.
Just wanted to mention that the latest version of Rails (2.3.5) has a dependency of Rack 1.0.1 so this will need a fix. LiteSpeed staff - is the fix suggested by Grzegorz recommended? Or you do you have a better solution? Kind Regards Luke |
i suggest this solution:
Code:
rack_input = StringIO.new($stdin.read.to_s) |
| All times are GMT -7. The time now is 12:18 AM. |