Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Bug in Webrick::CampingHandler (typo in the code
Vassilis Rizopoulos
7/5/2007 3:50:00 PM
OK, I can't seem to get ticket creation priviliges in the Trac for
Camping so I'll post it here for _why to see.
On the occasion of the LRSC Name Picker summary I adapted a bit of the
code to play around with X-Sendfile headers.
In my setup, instead of using CampingServer I use the WEBRick handler:
s = HTTPServer.new(:Port => port, :DocumentRoot => docroot )
s.mount mountpoint, WEBrick::CampingHandler, RutemaWeb
This view:
class StyleSheet < R '/style.css'
def get
@headers['Content-Type'] = 'text/css'
@headers['X-Sendfile'] = File.join(RutemaWeb::HTDOCS,"style.css")
end
end
generates the following exception in WEBRick:
localhost - - [05/Jul/2007:17:33:44 CEST] "GET / HTTP/1.1" 200 1223
- -> /
[2007-07-05 17:33:44] ERROR NameError: undefined local variable or
method `res' for #<WEBrick::CampingHandler:0x262a1f4>
/opt/local/lib/ruby/gems/1.8/gems/camping-1.5/lib/camping/webrick.rb:59:in
`service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/opt/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/opt/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/opt/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/opt/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/opt/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
./lib/rutemaweb/rutemaweb.rb:247:in `start_server'
bin/rutemaweb:9
localhost - - [05/Jul/2007:17:33:44 CEST] "GET /style.css HTTP/1.1" 500 367
http://localhost:3301/ -> /style.css
The problem is line 59 in camping/webrick.rb:
-do_GET(req, res)
+do_GET(req, resp)
I've got the camping 1.5 gem installed.
Cheers,
V.-
--
http://www.braveworl...
1 Answer
Gregory Brown
7/5/2007 3:58:00 PM
0
On 7/5/07, Vassilis Rizopoulos <damphyr@freemail.gr> wrote:
> OK, I can't seem to get ticket creation priviliges in the Trac for
> Camping so I'll post it here for _why to see.
I filed a ticket on your behalf:
http://code.whytheluckystiff.net/camping/...
To get access to the Trac, you should enter your rubyforge info here:
http://code.whytheluckystiff.n...
I can't remember if it takes some time to process, but then you can
just log in with your RubyForge username and password.
cheers,
-greg
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Bug in Webrick::CampingHandler (typo in the code
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password