returning HTTP codes from RubyAuthenHandler _and_ a script?
SteveC <[email protected]> Fri, 12 Aug 2005 11:04:20 +0100
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Message-ID | <[email protected]> |
Hi, I have a RubyAuthenHandler which works. It does the authentication in order for a browser to run other scripts, eg when invoked: http://fred:[email protected]/bar.rbx?variable=blahblah the RubyAuthenHandler returns OK for the user fred with passowrd blah. This done, apache uses mod_ruby to rub bar.rbx. The problem is I would like bar.rbx to be able to respond with HTTP_NOT_FOUND and other codes based on 'variable'. Why? Because I want to implement a RESTful API. So the problem is when I try to return a response code from bar.rbx I keep getting errors saying 'return can't jump across threads'. This only happens when using the RubyAuthenHandler. So can the bar.rbx script override the RubyAuthenHandler's response code, or something? The only way I can see to fix this would be to attach ?user=fred&password=blah on every URL, rather than using a RubyAuthenHandler Help! Thanks in advance. have fun, SteveC [email protected] http://www.fractalus.com/steve/