google-code-export / appengine-jruby

Automatically exported from code.google.com/p/appengine-jruby
0 stars 0 forks source link

Rack::Request#url is broken #72

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create config.ru
-----
require 'appengine-rack'
AppEngine::Rack.configure_app(
    :application => "your-app-id",
    :precompilation_enabled => true,
    :version => "02rack")
run lambda {|env|
  req = Rack::Request.new(env)
  p([req.url, req.params, req.scheme, req.host, req.port, req.fullpath,
req.query_string])
  Rack::Response.new("Hello, 02Rack url=#{req.url}").finish
}
-----
2. open http://localhost:8080/aaa
  req.url is "http://localhost:8080/aaa/aaa"

What is the expected output? What do you see instead?
  req.url must be "http://localhost:8080/aaa"

Please use labels and text to provide additional information.
  With rackup+mongrel, req.url was "http://localhost:8080/aaa".
  Its OK.

Original issue reported on code.google.com by sasaki.t...@gmail.com on 10 Feb 2010 at 5:29

GoogleCodeExporter commented 9 years ago
jruby + rack is OK.

% jruby -S rackup config.ru
[2010-02-10 15:12:04] INFO  WEBrick 1.3.1
[2010-02-10 15:12:04] INFO  ruby 1.8.7 (2009-11-02) [java]
[2010-02-10 15:12:04] INFO  WEBrick::HTTPServer#start: pid=11245 port=9292
["http://localhost:9292/", {}, "http", "localhost", 9292, "/", ""]
0:0:0:0:0:0:0:1 - - [10/Feb/2010 15:12:19] "GET / HTTP/1.1" 200 40 0.0340
["http://localhost:9292/aaa", {}, "http", "localhost", 9292, "/aaa", ""]
0:0:0:0:0:0:0:1 - - [10/Feb/2010 15:12:25] "GET /aaa HTTP/1.1" 200 43 0.0200

Original comment by sasaki.t...@gmail.com on 10 Feb 2010 at 6:14