rails request.request_uri should show parameters?

#1
Not sure if this is a bug, but LiteSpeed behaviour is different from Mongrel/Webrick and Rails documentation.

Rails docu states that GET query parameters are included in request.request_uri. This happens with Mongrel. This does not happen in LiteSpeed.

Mongrel: path /articles?type=A request_uri /articles?type=A
LiteSpeed: path /articles?type=A request_uri /articles

It causes problems with the current_page? method.

Rails 1.2.3
RESTful controller
LiteSpeed 3.1.1-std
Rails lsapi
Linux 32-bit
 

mistwang

LiteSpeed Staff
#2
For some reason the QUERY_STRING part has been cut off from "REQUEST_URI" in our lsruby.c.
What is the relation between "request_uri" and "ENV['REQUEST_URI']"? Same value? If yes, you can just comment out line 105 & 106 in lsruby.c
Code:
                valLen = p - pValue;
                *p++ = 0;
 
#3
Thanks, the values are indeed the same.

How do I update the local gem though? Changing the source and executing the commands below does not seem to have an effect. What is the procedure to recompile and reinstall the gem?

Went to /usr/local/lib/ruby/gems/1.8/gems/ruby-lsapi-2.4/ext/lsapi, changed the source and executed these commands:

Code:
sudo ruby setup.rb config
sudo ruby setup.rb setup
sudo ruby setup.rb install
Then restarted LiteSpeed but no change.
 

mistwang

LiteSpeed Staff
#4
ruby-lsapi 2.5 has been released, please give it a try.
The manual installation may mess up with gem install. you may have to remove the lsapi.so created by "ruby setup.rb install".
 
#6
ruby-lsapi 2.5 seems to have a different issue, although i have been unable to investigate in depth. It seems under certain circumstances the actual question mark sign ? is included in the first query parameter name.
 
Top