[bknr-cvs] edi changed trunk/thirdparty/hunchentoot/
BKNR Commits
bknr at bknr.net
Wed Feb 11 21:19:33 UTC 2009
Revision: 4239
Author: edi
URL: http://bknr.net/trac/changeset/4239
Some fixes
U trunk/thirdparty/hunchentoot/acceptor.lisp
U trunk/thirdparty/hunchentoot/lispworks.lisp
U trunk/thirdparty/hunchentoot/packages.lisp
U trunk/thirdparty/hunchentoot/specials.lisp
Modified: trunk/thirdparty/hunchentoot/acceptor.lisp
===================================================================
--- trunk/thirdparty/hunchentoot/acceptor.lisp 2009-02-10 19:56:25 UTC (rev 4238)
+++ trunk/thirdparty/hunchentoot/acceptor.lisp 2009-02-11 21:19:33 UTC (rev 4239)
@@ -40,7 +40,7 @@
:accessor acceptor-name
:documentation "The optional name of the acceptor, a symbol.")
(request-class :initarg :request-class
- :reader acceptor-request-class
+ :accessor acceptor-request-class
:documentation "Determines which class of request
objects is created when a request comes in and should be \(a symbol
naming) a class which inherits from REQUEST.")
@@ -54,10 +54,10 @@
responsible for listening to new connections and scheduling them for
execution.")
(output-chunking-p :initarg :output-chunking-p
- :reader acceptor-output-chunking-p
+ :accessor acceptor-output-chunking-p
:documentation "Whether the acceptor may use output chunking.")
(input-chunking-p :initarg :input-chunking-p
- :reader acceptor-input-chunking-p
+ :accessor acceptor-input-chunking-p
:documentation "Whether the acceptor may use input chunking.")
(persistent-connections-p :initarg :persistent-connections-p
:accessor acceptor-persistent-connections-p
@@ -68,17 +68,17 @@
for non-threaded acceptors.")
(read-timeout :initarg :read-timeout
:reader acceptor-read-timeout
- :documentation "The connection timeout of the acceptor,
-specified in (fractional) seconds. Connections that are idle for
-longer than this time are closed by Hunchentoot. The precise
+ :documentation "The connection timeout of the
+acceptor, specified in \(fractional) seconds. Connections that are
+idle for longer than this time are closed by Hunchentoot. The precise
semantics of this parameter is determined by the underlying Lisp's
-implementation of socket timeouts.")
+implementation of socket timeouts. NIL means no timeout.")
(write-timeout :initarg :write-timeout
:reader acceptor-write-timeout
- :documentation "The connection timeout of the acceptor,
-specified in (fractional) seconds. The precise semantics of this
-parameter is determined by the underlying Lisp's implementation of
-socket timeouts.")
+ :documentation "The connection timeout of the
+acceptor, specified in \(fractional) seconds. The precise semantics
+of this parameter is determined by the underlying Lisp's
+implementation of socket timeouts. NIL means no timeout.")
#+:lispworks
(process :accessor acceptor-process
:documentation "The Lisp process which accepts incoming
@@ -116,9 +116,13 @@
:name (gensym)
:request-class 'request
:request-dispatcher 'dispatch-request
- :connection-dispatcher (make-instance 'one-thread-per-connection-dispatcher)
+ :connection-dispatcher (make-instance (cond (*supports-threads-p* 'one-thread-per-connection-dispatcher)
+ (t 'single-threaded-connection-dispatcher)))
:output-chunking-p t
:input-chunking-p t
+ :persistent-connections-p t
+ :read-timeout nil
+ :write-timeout nil
:access-logger 'log-access
:message-logger 'log-message)
(:documentation "An object of this class contains all relevant
@@ -131,7 +135,7 @@
(defgeneric start (acceptor)
(:documentation "Starts the ACCEPTOR so that it begins accepting
-connections."))
+connections. Returns the acceptor."))
(defgeneric stop (acceptor)
(:documentation "Stops the ACCEPTOR so that it no longer accepts
@@ -141,7 +145,7 @@
(:documentation "Sets up a listen socket for the given ACCEPTOR and
enables it to listen for incoming connections. This function is
called from the thread that starts the acceptor initially and may
-return errors resulting from the listening operation. (like 'address
+return errors resulting from the listening operation \(like 'address
in use' or similar)."))
(defgeneric accept-connections (acceptor)
@@ -182,7 +186,8 @@
(start-listening acceptor)
(let ((connection-dispatcher (acceptor-connection-dispatcher acceptor)))
(setf (acceptor connection-dispatcher) acceptor)
- (execute-acceptor connection-dispatcher)))
+ (execute-acceptor connection-dispatcher))
+ acceptor)
(defmethod stop ((acceptor acceptor))
(setf (acceptor-shutdown-p acceptor) t)
@@ -191,8 +196,8 @@
(usocket:socket-close (acceptor-listen-socket acceptor)))
(defmethod initialize-connection-stream (acceptor stream)
+ (declare (ignore acceptor))
;; default method does nothing
- (declare (ignore acceptor))
stream)
(defmethod reset-connection-stream (acceptor stream)
Modified: trunk/thirdparty/hunchentoot/lispworks.lisp
===================================================================
--- trunk/thirdparty/hunchentoot/lispworks.lisp 2009-02-10 19:56:25 UTC (rev 4238)
+++ trunk/thirdparty/hunchentoot/lispworks.lisp 2009-02-11 21:19:33 UTC (rev 4239)
@@ -62,8 +62,7 @@
"The function which is called if *CLEANUP-INTERVAL* is not NIL.")
(defvar *worker-counter* 0
- "Internal counter used to generate meaningful names for worker
-threads.")
+ "Internal counter used to count worker threads.")
(defun cleanup-function ()
"The default for *CLEANUP-FUNCTION*. Invokes a GC on 32-bit
Modified: trunk/thirdparty/hunchentoot/packages.lisp
===================================================================
--- trunk/thirdparty/hunchentoot/packages.lisp 2009-02-10 19:56:25 UTC (rev 4238)
+++ trunk/thirdparty/hunchentoot/packages.lisp 2009-02-11 21:19:33 UTC (rev 4239)
@@ -115,6 +115,19 @@
"+HTTP-USE-PROXY+"
"+HTTP-VERSION-NOT-SUPPORTED+"
"ACCEPTOR"
+ "ACCEPTOR-ACCESS-LOGGER"
+ "ACCEPTOR-ADDRESS"
+ "ACCEPTOR-INPUT-CHUNKING-P"
+ "ACCEPTOR-MESSAGE-LOGGER"
+ "ACCEPTOR-NAME"
+ "ACCEPTOR-OUTPUT-CHUNKING-P"
+ "ACCEPTOR-PERSISTENT-CONNECTIONS-P"
+ "ACCEPTOR-PORT"
+ "ACCEPTOR-READ-TIMEOUT"
+ "ACCEPTOR-REQUEST-CLASS"
+ "ACCEPTOR-REQUEST-DISPATCHER"
+ "ACCEPTOR-SSL-P"
+ "ACCEPTOR-WRITE-TIMEOUT"
"ACCESS-LOG-FILE"
"AUTHORIZATION"
"AUX-REQUEST-VALUE"
@@ -166,7 +179,6 @@
"INITIALIZE-CONNECTION-STREAM"
"LOG-FILE"
"LOG-MESSAGE"
- "MAYBE-INVOKE-DEBUGGER"
"MIME-TYPE"
"NO-CACHE"
"PARAMETER"
@@ -200,11 +212,6 @@
"SCRIPT-NAME"
"SCRIPT-NAME*"
"SEND-HEADERS"
- "ACCEPTOR-ADDRESS"
- "ACCEPTOR-REQUEST-DISPATCHER"
- "ACCEPTOR-NAME"
- "ACCEPTOR-PORT"
- "ACCEPTOR-SSL-P"
"SERVER-PROTOCOL"
"SERVER-PROTOCOL*"
"SESSION-COOKIE-VALUE"
Modified: trunk/thirdparty/hunchentoot/specials.lisp
===================================================================
--- trunk/thirdparty/hunchentoot/specials.lisp 2009-02-10 19:56:25 UTC (rev 4238)
+++ trunk/thirdparty/hunchentoot/specials.lisp 2009-02-11 21:19:33 UTC (rev 4239)
@@ -289,10 +289,6 @@
"During the execution of dispatchers and handlers this variable
is bound to the SERVER object which processes the request.")
-(defvar *worker-counter* 0
- "Internal counter used to generate meaningful names for worker
-threads.")
-
(defvar *default-connection-timeout* 20
"The default connection timeout used when a Hunchentoot server is
reading from and writing to a socket stream.")
More information about the Bknr-cvs
mailing list