From johan at riise-data.no Mon Mar 5 12:33:15 2007 From: johan at riise-data.no (Johan Ur Riise) Date: Mon, 05 Mar 2007 13:33:15 +0100 Subject: [araneida-devel] Re: utf-8 and unsigned-byte 8 In-Reply-To: <20070223014204.GA32725@riise-data.no> References: <20070223014204.GA32725@riise-data.no> Message-ID: <20070305123315.GA1636@riise-data.no> On Fri, Feb 23, 2007 at 02:42:04AM +0100, Johan Ur Riise wrote: > I have a patch that enables utf-8 request streams, and at the same time > let me send binary files using the static file handler. > Hmm, this should be possible also with the misnomed :default element-type of sbcl, but I could not get it working. -- Hilsen Johan Ur Riise From joubert at joubster.com Tue Mar 6 04:07:21 2007 From: joubert at joubster.com (Joubert Nel) Date: Mon, 05 Mar 2007 23:07:21 -0500 Subject: [araneida-devel] request-authorized-p (implementation of generic function to yield authorization status) Message-ID: <1173154041.24655.13.camel@joubster> Hi, I'm trying to create an authorization scheme in Araneida. Basically whenever a location in my URL space is called I want to check whether the user is authorized and redirect to a login page if he isn't. I found this post on usenet: http://groups.google.com/group/comp.lang.lisp/browse_thread/thread/a6990567666934d2/12bca167849b64e9?lnk=gst&q=request-authorized-p&rnum=1&hl=en&fwc=2 According to this post, the generic function "request-authorized-p" is called for every request to determine whether a client is authorized. To test this, I've got: ============= snip ================== (defclass root-page-handler (araneida:handler) ()) (defmethod request-authorized-p ((araneida:handler root-page-handler) method request) (format t "not authorized")) (defmethod request-not-authorized ((araneida:handler root-page-handler) method request) (araneida:request-redirect request *login-urlstring*)) (defmethod handle-request-response ((araneida:handler root-page-handler) method request) (araneida:request-send-headers request) (araneida:html-stream (araneida:request-stream request) `(html (body (p "logged in"))))) (defparameter *root-page-handler-instance* (make-instance 'root-page-handler)) (araneida:install-handler (http-listener-handler *listener*) *root-page-handler-instance* *app-urlstring* t) ============= snip ================== So, I've got request-authorized-p on class root-page-handler. However, I find that this method is never called by Araneida; instead, handle-request-response is still called. What gives? What am I missing? Joubert