[Bese-devel] Using araneida

Brian Downing bdowning at lavos.net
Sun May 1 16:32:50 UTC 2005


On Sun, May 01, 2005 at 03:48:49PM +0200, Marco Baringer wrote:
> using araneida should "just work," so please keep trying and we'll see
> what the issue is.

I had a different (intermittent) issue with Araneida which eventually
led me to find a problem in the Araneida backend.

It looks like the backend was written to expect keywords in the header
alist, but there are strings there now.

The result of this was that I was getting "HTTP/1.0 NIL OK" coming out
of it, which occasionally caused my proxy to lose its mind.  I have _no_
idea why it ever worked.

Here are my changes - definitely not the best way to fix it, but it worked
without changing the case logic (as case is always an EQL test).

--- orig/src/backend/araneida.lisp
+++ mod/src/backend/araneida.lisp
@@ -152,7 +152,7 @@
   (let (content-type content-length expires cache-control location refresh
        pragma set-cookie conditional www-authenticate last-modified extra-headers)
   (dolist* (header-cons (headers r))
-    (case (car header-cons)
+    (case (intern (car header-cons) "KEYWORD")
       (:content-type     (setf content-type     (cdr header-cons)))
       (:content-length   (setf content-length   (cdr header-cons)))
       (:expires          (setf expires          (cdr header-cons)))
@@ -167,7 +167,7 @@
       (t (push header-cons extra-headers))))
   (let ((content (get-output-stream-string (content-stream r))))
     (araneida:request-send-headers (request r)
-                                  :response-code (cdr (assoc :status (headers r)))
+                                  :response-code (cdr (assoc "Status" (headers r) :test #'string=))
                                   :content-type (or content-type "text/html")
                                   :content-length (or content-length (length content))
                                   :expires expires



-bcd



More information about the bese-devel mailing list