LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > rails request.request_uri should show parameters?

Reply
 
Thread Tools Display Modes
  #1  
Old 05-17-2007, 03:42 PM
joost joost is offline
New Member
 
Join Date: Feb 2007
Posts: 5
Default rails request.request_uri should show parameters?

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
Reply With Quote
  #2  
Old 05-17-2007, 09:55 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
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;
Reply With Quote
  #3  
Old 05-18-2007, 01:29 AM
joost joost is offline
New Member
 
Join Date: Feb 2007
Posts: 5
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.
Reply With Quote
  #4  
Old 05-18-2007, 02:05 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
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".
Reply With Quote
  #5  
Old 05-18-2007, 03:25 PM
joost joost is offline
New Member
 
Join Date: Feb 2007
Posts: 5
2.5 fixed this problem. Thanks so much!

(Truth be told I did release a work-around by moving the query parameters into the url path)
Reply With Quote
  #6  
Old 05-19-2007, 02:47 PM
joost joost is offline
New Member
 
Join Date: Feb 2007
Posts: 5
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.
Reply With Quote
  #7  
Old 05-19-2007, 04:14 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
My bad, 2.5 package has been updated to have it addressed.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:36 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.