how can I catch HTTP 501?
Albert Ng
twinwing at gmail.com
Sat Feb 23 11:08:01 EST 2008
I'm using camping with reststop to do a html front end for sending
pre-defined messages to different devices (puts will work) depending on the
time (will parse cron). No real deadline.
Works great up to now, much fun, forgot to sleep.
Problem is when I pass a URL of the form /device/1/ping without a "Ping"
controller method. It will send me a "501 Not Implemented". Interestingly
enough, /device/1/1/ping will give me "404 Not Found" which I have properly
handled.
So my question are:
In what part of the code can I catch the 501?
How can I implement a catch-all controller method?
Who's giving me the nicely formated web page when the 501's happening?
Where could I have found that out?
If I stop using reststop, will the problem go away?
Attached is what I have worked up till now. Has a postamble, will work with
webrick.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/camping-list/attachments/20080223/b945c1da/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ctd.rb
Type: application/octet-stream
Size: 4330 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/camping-list/attachments/20080223/b945c1da/attachment-0001.obj
More information about the Camping-list
mailing list