Anonymous avatar Anonymous committed bda7b92

Make Weblocks compatible with Hunchentoot >1.1.1.

Comments (0)

Files changed (2)

src/acceptor.lisp

 
 (export '(weblocks-acceptor))
 
-(defclass weblocks-acceptor (acceptor)
+(defclass weblocks-acceptor (#.(if (find-class 'easy-acceptor nil)
+                                 'easy-acceptor
+                                 'acceptor))
   ((session-cookie-name :type string :accessor session-cookie-name
                         :initarg :session-cookie-name
                         :initform (format nil "weblocks-~(~A~)" (gensym)))))

src/request-handler.lisp

 (in-package :weblocks)
 
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (when (find-symbol "*APPROVED-RETURN-CODES*" 'hunchentoot)
+    (pushnew 'hunchentoot-approved-return-codes *features*)))
 
 (export '(handle-client-request
           *before-ajax-complete-scripts*
           *request-timeout*
           *backtrace-on-session-init-error*
           *style-warn-on-circular-dirtying*
-          *style-warn-on-late-propagation*))
+          *style-warn-on-late-propagation*
+          #-hunchentoot-approved-return-codes
+            *approved-return-codes*))
+
+#-hunchentoot-approved-return-codes
+  (defvar *approved-return-codes* (list +http-ok+))
 
 (defvar *before-ajax-complete-scripts*)
 (setf (documentation '*before-ajax-complete-scripts* 'variable)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.