Closed jtaby closed 14 years ago
If you setup a proxy like so:
proxy '/fu/', :to => 'localhost/~majd', :url => '/'
Then sc-server will throw an exception like so:
SocketError: getaddrinfo: nodename nor servname provided, or not known /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:644:in initialize' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:644:inopen' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:644:in block in connect' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/timeout.rb:44:intimeout' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/timeout.rb:87:in timeout' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:644:inconnect' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:637:in do_start' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:626:instart' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:490:in start' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/rack/proxy.rb:73:inhandle_proxy' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/rack/proxy.rb:25:in block in call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/rack/proxy.rb:23:ineach' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/rack/proxy.rb:23:in call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/cascade.rb:23:inblock in call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/cascade.rb:22:in each' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/cascade.rb:22:incall' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/showexceptions.rb:24:in call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/recursive.rb:43:in_call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/recursive.rb:38:in call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/conditionalget.rb:25:incall' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/rack/service.rb:110:in call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/content_length.rb:13:incall' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/chunked.rb:15:in call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/connection.rb:76:inblock in pre_process' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/connection.rb:74:in catch' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/connection.rb:74:inpre_process' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/connection.rb:57:in process' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/connection.rb:42:inreceive_data' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in run_machine' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:inrun' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/backends/base.rb:57:in start' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/server.rb:156:instart' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/handler/thin.rb:14:in run' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/rack/service.rb:93:instart' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/tools/server.rb:43:in server' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.1/lib/thor/task.rb:22:inrun' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.1/lib/thor/invocation.rb:118:in invoke_task' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.1/lib/thor.rb:246:indispatch' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.1/lib/thor/base.rb:389:in start' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/tools.rb:337:instart' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/tools.rb:30:in invoke' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/bin/sc-server:16:in<top (required)>' /Users/majd/.rvm/gems/ruby-1.9.2-p0/bin/sc-server:19:in load' /Users/majd/.rvm/gems/ruby-1.9.2-p0/bin/sc-server:19:in'
initialize' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:644:in
block in connect' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/timeout.rb:44:in
timeout' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:644:in
do_start' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:626:in
start' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/rack/proxy.rb:73:in
block in call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/rack/proxy.rb:23:in
call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/cascade.rb:23:in
each' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/cascade.rb:22:in
call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/recursive.rb:43:in
call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/conditionalget.rb:25:in
call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/content_length.rb:13:in
call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/connection.rb:76:in
catch' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/connection.rb:74:in
process' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/connection.rb:42:in
run_machine' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
start' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/server.rb:156:in
run' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/rack/service.rb:93:in
server' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.1/lib/thor/task.rb:22:in
invoke_task' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.1/lib/thor.rb:246:in
start' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/tools.rb:337:in
invoke' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/bin/sc-server:16:in
load' /Users/majd/.rvm/gems/ruby-1.9.2-p0/bin/sc-server:19:in
You set it up wrong. You want
proxy '/fu', :to => 'localhost', :url => '/~majd'
If you setup a proxy like so:
proxy '/fu/', :to => 'localhost/~majd', :url => '/'
Then sc-server will throw an exception like so:
SocketError: getaddrinfo: nodename nor servname provided, or not known /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:644:in'
initialize' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:644:in
open' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:644:inblock in connect' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/timeout.rb:44:in
timeout' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/timeout.rb:87:intimeout' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:644:in
connect' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:637:indo_start' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:626:in
start' /Users/majd/.rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/net/http.rb:490:instart' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/rack/proxy.rb:73:in
handle_proxy' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/rack/proxy.rb:25:inblock in call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/rack/proxy.rb:23:in
each' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/rack/proxy.rb:23:incall' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/cascade.rb:23:in
block in call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/cascade.rb:22:ineach' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/cascade.rb:22:in
call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/showexceptions.rb:24:incall' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/recursive.rb:43:in
_call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/recursive.rb:38:incall' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/conditionalget.rb:25:in
call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/rack/service.rb:110:incall' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/content_length.rb:13:in
call' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/chunked.rb:15:incall' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/connection.rb:76:in
block in pre_process' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/connection.rb:74:incatch' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/connection.rb:74:in
pre_process' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/connection.rb:57:inprocess' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/connection.rb:42:in
receive_data' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:inrun_machine' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in
run' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/backends/base.rb:57:instart' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thin-1.2.7/lib/thin/server.rb:156:in
start' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/rack-1.2.1/lib/rack/handler/thin.rb:14:inrun' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/rack/service.rb:93:in
start' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/tools/server.rb:43:inserver' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.1/lib/thor/task.rb:22:in
run' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.1/lib/thor/invocation.rb:118:ininvoke_task' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.1/lib/thor.rb:246:in
dispatch' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.1/lib/thor/base.rb:389:instart' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/tools.rb:337:in
start' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/lib/sproutcore/tools.rb:30:ininvoke' /Users/majd/.rvm/gems/ruby-1.9.2-p0/gems/sproutcore-1.4.1/bin/sc-server:16:in
<top (required)>' /Users/majd/.rvm/gems/ruby-1.9.2-p0/bin/sc-server:19:inload' /Users/majd/.rvm/gems/ruby-1.9.2-p0/bin/sc-server:19:in