From bknr at bknr.net Wed Jan 12 15:28:50 2011 From: bknr at bknr.net (BKNR Commits) Date: Wed, 12 Jan 2011 16:28:50 +0100 Subject: [bknr-cvs] edi changed trunk/thirdparty/cl-unicode/ Message-ID: Revision: 4626 Author: edi URL: http://bknr.net/trac/changeset/4626 Fix pathname creation U trunk/thirdparty/cl-unicode/CHANGELOG.txt U trunk/thirdparty/cl-unicode/build/dump.lisp Modified: trunk/thirdparty/cl-unicode/CHANGELOG.txt =================================================================== --- trunk/thirdparty/cl-unicode/CHANGELOG.txt 2010-11-18 11:13:46 UTC (rev 4625) +++ trunk/thirdparty/cl-unicode/CHANGELOG.txt 2011-01-12 15:28:49 UTC (rev 4626) @@ -1,3 +1,5 @@ +Fix pathname creation (thanks to Juan Jos? Garcia-Ripoll) + Version 0.1.1 2008-07-24 Make ADD-HANGUL-NAMES faster for ClozureCL Modified: trunk/thirdparty/cl-unicode/build/dump.lisp =================================================================== --- trunk/thirdparty/cl-unicode/build/dump.lisp 2010-11-18 11:13:46 UTC (rev 4625) +++ trunk/thirdparty/cl-unicode/build/dump.lisp 2011-01-12 15:28:49 UTC (rev 4626) @@ -187,7 +187,7 @@ is not used in read.lisp) and uses it to create a file \"derived-properties\" which will be used by CL-UNICODE-TEST." (with-output-to-source-file (out (make-pathname :name "derived-properties" - :type :unspecific + :type nil :directory '(:relative :up "test")) :no-header-p t) (let (last-test) From bknr at bknr.net Wed Jan 12 15:37:10 2011 From: bknr at bknr.net (BKNR Commits) Date: Wed, 12 Jan 2011 16:37:10 +0100 Subject: [bknr-cvs] edi changed trunk/thirdparty/cl-unicode/ Message-ID: Revision: 4627 Author: edi URL: http://bknr.net/trac/changeset/4627 Revert previous change U trunk/thirdparty/cl-unicode/CHANGELOG.txt U trunk/thirdparty/cl-unicode/build/dump.lisp Modified: trunk/thirdparty/cl-unicode/CHANGELOG.txt =================================================================== --- trunk/thirdparty/cl-unicode/CHANGELOG.txt 2011-01-12 15:28:49 UTC (rev 4626) +++ trunk/thirdparty/cl-unicode/CHANGELOG.txt 2011-01-12 15:37:10 UTC (rev 4627) @@ -1,5 +1,3 @@ -Fix pathname creation (thanks to Juan Jos? Garcia-Ripoll) - Version 0.1.1 2008-07-24 Make ADD-HANGUL-NAMES faster for ClozureCL Modified: trunk/thirdparty/cl-unicode/build/dump.lisp =================================================================== --- trunk/thirdparty/cl-unicode/build/dump.lisp 2011-01-12 15:28:49 UTC (rev 4626) +++ trunk/thirdparty/cl-unicode/build/dump.lisp 2011-01-12 15:37:10 UTC (rev 4627) @@ -187,7 +187,7 @@ is not used in read.lisp) and uses it to create a file \"derived-properties\" which will be used by CL-UNICODE-TEST." (with-output-to-source-file (out (make-pathname :name "derived-properties" - :type nil + :type :unspecific :directory '(:relative :up "test")) :no-header-p t) (let (last-test) From bknr at bknr.net Wed Jan 12 22:40:12 2011 From: bknr at bknr.net (BKNR Commits) Date: Wed, 12 Jan 2011 23:40:12 +0100 Subject: [bknr-cvs] edi changed trunk/thirdparty/cl-unicode/ Message-ID: Revision: 4628 Author: edi URL: http://bknr.net/trac/changeset/4628 Try it again U trunk/thirdparty/cl-unicode/CHANGELOG.txt U trunk/thirdparty/cl-unicode/build/dump.lisp Modified: trunk/thirdparty/cl-unicode/CHANGELOG.txt =================================================================== --- trunk/thirdparty/cl-unicode/CHANGELOG.txt 2011-01-12 15:37:10 UTC (rev 4627) +++ trunk/thirdparty/cl-unicode/CHANGELOG.txt 2011-01-12 22:40:12 UTC (rev 4628) @@ -1,3 +1,5 @@ +Make pathname creation conformant (thanks to Juan Jos? Garcia-Ripoll) + Version 0.1.1 2008-07-24 Make ADD-HANGUL-NAMES faster for ClozureCL Modified: trunk/thirdparty/cl-unicode/build/dump.lisp =================================================================== --- trunk/thirdparty/cl-unicode/build/dump.lisp 2011-01-12 15:37:10 UTC (rev 4627) +++ trunk/thirdparty/cl-unicode/build/dump.lisp 2011-01-12 22:40:12 UTC (rev 4628) @@ -105,7 +105,10 @@ writes to the file denoted by RELATIVE-PATH - a path relative to the location of this source file. Writes a Lisp header to the files unless NO-HEADER-P is true." - `(let ((pathname (merge-pathnames ,relative-path *this-file*))) + `(let ((pathname (merge-pathnames ,relative-path + (make-pathname :name nil + :type nil + :defaults *this-file*)))) (when *compile-verbose* (format t "~&;;; Writing source file ~A" (file-namestring pathname)) (force-output)) From bknr at bknr.net Wed Jan 12 22:42:58 2011 From: bknr at bknr.net (BKNR Commits) Date: Wed, 12 Jan 2011 23:42:58 +0100 Subject: [bknr-cvs] edi changed trunk/thirdparty/cl-unicode/build/dump.lisp Message-ID: Revision: 4629 Author: edi URL: http://bknr.net/trac/changeset/4629 Forgot one... U trunk/thirdparty/cl-unicode/build/dump.lisp Modified: trunk/thirdparty/cl-unicode/build/dump.lisp =================================================================== --- trunk/thirdparty/cl-unicode/build/dump.lisp 2011-01-12 22:40:12 UTC (rev 4628) +++ trunk/thirdparty/cl-unicode/build/dump.lisp 2011-01-12 22:42:58 UTC (rev 4629) @@ -190,7 +190,7 @@ is not used in read.lisp) and uses it to create a file \"derived-properties\" which will be used by CL-UNICODE-TEST." (with-output-to-source-file (out (make-pathname :name "derived-properties" - :type :unspecific + :type nil :directory '(:relative :up "test")) :no-header-p t) (let (last-test) From bknr at bknr.net Fri Jan 21 18:58:17 2011 From: bknr at bknr.net (BKNR Commits) Date: Fri, 21 Jan 2011 19:58:17 +0100 Subject: [bknr-cvs] edi changed trunk/thirdparty/hunchentoot/ Message-ID: Revision: 4630 Author: edi URL: http://bknr.net/trac/changeset/4630 Fix DEFINE-EASY-HANDLER U trunk/thirdparty/hunchentoot/CHANGELOG U trunk/thirdparty/hunchentoot/easy-handlers.lisp Modified: trunk/thirdparty/hunchentoot/CHANGELOG =================================================================== --- trunk/thirdparty/hunchentoot/CHANGELOG 2011-01-12 22:42:58 UTC (rev 4629) +++ trunk/thirdparty/hunchentoot/CHANGELOG 2011-01-21 18:58:17 UTC (rev 4630) @@ -1,3 +1,4 @@ +Fix DEFINE-EASY-HANDLER for multiple acceptors (Nicolas Neuss) Revived *SHOW-LISP-BACKTRACES-P* Made sure "100 Continue" is returned even if the client sends "Expect: 100-continue" twice (reported by Gordon Sims) Fixed typo in code which interprets transfer encodings @@ -24,7 +25,7 @@ Version 1.0.0 2009-02-19 Complete architectural redesign (together with Hans H?bner) -Lots of small fixes and improvements, too many to enumerate here +Lots of small fixes and improvements, too many to enumerate here Version 0.15.6 2008-04-09 @@ -75,7 +76,7 @@ Version 0.14.4 2007-10-20 -Made log stream shared on OpenMCL (thanks to Gary Byers) +Made log stream shared on OpenMCL (thanks to Gary Byers) Version 0.14.3 2007-10-07 @@ -83,12 +84,12 @@ Version 0.14.2 2007-09-26 -Better handling of PORT parameter in REDIRECT (thanks to Vladimir Sedach) +Better handling of PORT parameter in REDIRECT (thanks to Vladimir Sedach) Version 0.14.1 2007-09-24 Fixed bug where you couldn't set "Server" header (caught by Ralf Mattes) -Documentation clarification for HEADER-OUT function +Documentation clarification for HEADER-OUT function Version 0.14.0 2007-09-18 @@ -100,12 +101,12 @@ Version 0.12.1 2007-09-13 -Better support for WITH-TIMEOUT on SBCL/Win32 (thanks to Anton Vodonosov) - +Better support for WITH-TIMEOUT on SBCL/Win32 (thanks to Anton Vodonosov) + Version 0.12.0 2007-09-07 Now uses bound for flexi stream returned by RAW-POST-DATA -Needs FLEXI-STREAMS 0.12.0 or higher +Needs FLEXI-STREAMS 0.12.0 or higher Version 0.11.2 2007-09-05 @@ -115,7 +116,7 @@ Version 0.11.1 2007-05-25 Fixes for OpenMCL (thanks to Lennart Staflin and Tiarnan O'Corrain) - + Version 0.11.0 2007-05-25 Added server names and coupled them with easy handlers (suggested by Mac Chan) @@ -137,7 +138,7 @@ Version 0.9.1 2007-04-29 Added PORT parameter to REDIRECT (suggested by Cyrus Harmon) -Exported REMOVE-SESSION (suggested by Vamsee Kanakala) +Exported REMOVE-SESSION (suggested by Vamsee Kanakala) Version 0.9.0 2007-04-19 @@ -192,12 +193,12 @@ Version 0.7.0 2007-03-09 Development port (no threads) to SBCL/Win32 (patch by Marko Kocic) -Support for compilation without SSL +Support for compilation without SSL Version 0.6.2 2007-02-22 Don't use NSTRING-UPCASE for outgoing headers (bug caught by Saurabh Nanda) -Changed ProxyPass example in docs from /lisp to /hunchentoot +Changed ProxyPass example in docs from /lisp to /hunchentoot Version 0.6.1 2007-01-24 @@ -249,7 +250,7 @@ Version 0.4.7 2006-11-06 Changed behaviour of REAL-REMOTE-ADDR (as suggested by Robert J. Macomber) -Fixed COOKIE-OUT (thanks to Robert J. Macomber) +Fixed COOKIE-OUT (thanks to Robert J. Macomber) Version 0.4.6 2006-11-05 @@ -267,7 +268,7 @@ Version 0.4.3 2006-10-11 OpenMCL fixes (by Ralf Stoye) - + Version 0.4.2 2006-10-10 No timeouts for mod_lisp servers (as in Hunchentoot 0.3.x) @@ -279,8 +280,8 @@ Version 0.4.0 2006-10-10 Ported to CMUCL, SBCL, OpenMCL, and AllegroCL -Merged with TBNL -Tons of small changes, too many to list them individually +Merged with TBNL +Tons of small changes, too many to list them individually Version 0.3.2 2006-09-14 @@ -297,17 +298,17 @@ Version 0.2.2 2006-08-31 -Skip START-OUTPUT advice completely if working for TBNL +Skip START-OUTPUT advice completely if working for TBNL Version 0.2.1 2006-08-28 Added write timeouts for LW 5.0 -Updated LW links in documentation +Updated LW links in documentation Version 0.2.0 2006-08-28 Serves as infrastructure for TBNL now (to replace KMRCL) -For HTTP/1.1 only send 'Keep-Alive' headers if explicitly requested +For HTTP/1.1 only send 'Keep-Alive' headers if explicitly requested Version 0.1.5 2006-08-23 @@ -316,8 +317,8 @@ Version 0.1.4 2006-08-22 Refactored streams.lisp to appease LW compiler (thanks to Martin Simmons) -Changed handling of version string -Changed package handling in system definition (thanks to Christophe Rhodes) +Changed handling of version string +Changed package handling in system definition (thanks to Christophe Rhodes) Version 0.1.3 2006-02-08 @@ -334,5 +335,5 @@ Version 0.1.0 2005-12-31 Initial public release - + [For earlier changes see the file "CHANGELOG_TBNL" that is included with the release.] Modified: trunk/thirdparty/hunchentoot/easy-handlers.lisp =================================================================== --- trunk/thirdparty/hunchentoot/easy-handlers.lisp 2011-01-12 22:42:58 UTC (rev 4629) +++ trunk/thirdparty/hunchentoot/easy-handlers.lisp 2011-01-21 18:58:17 UTC (rev 4630) @@ -288,8 +288,11 @@ `(progn (setq *easy-handler-alist* (delete-if (lambda (list) - (or (equal ,uri (first list)) - (eq ',name (third list)))) + (and (or (equal ,uri (first list)) + (eq ',name (third list))) + (or (eq ,acceptor-names t) + (intersection ,acceptor-names + (second list))))) *easy-handler-alist*)) (push (list ,uri ,acceptor-names ',name) *easy-handler-alist*))))) (defun ,name (&key ,@(loop for part in lambda-list From bknr at bknr.net Fri Jan 21 19:01:44 2011 From: bknr at bknr.net (BKNR Commits) Date: Fri, 21 Jan 2011 20:01:44 +0100 Subject: [bknr-cvs] edi changed trunk/thirdparty/hunchentoot/ Message-ID: Revision: 4631 Author: edi URL: http://bknr.net/trac/changeset/4631 ECL fix U trunk/thirdparty/hunchentoot/CHANGELOG U trunk/thirdparty/hunchentoot/specials.lisp Modified: trunk/thirdparty/hunchentoot/CHANGELOG =================================================================== --- trunk/thirdparty/hunchentoot/CHANGELOG 2011-01-21 18:58:17 UTC (rev 4630) +++ trunk/thirdparty/hunchentoot/CHANGELOG 2011-01-21 19:01:44 UTC (rev 4631) @@ -1,3 +1,4 @@ +Patch for compilation with ECL (Sohail Somani) Fix DEFINE-EASY-HANDLER for multiple acceptors (Nicolas Neuss) Revived *SHOW-LISP-BACKTRACES-P* Made sure "100 Continue" is returned even if the client sends "Expect: 100-continue" twice (reported by Gordon Sims) Modified: trunk/thirdparty/hunchentoot/specials.lisp =================================================================== --- trunk/thirdparty/hunchentoot/specials.lisp 2011-01-21 18:58:17 UTC (rev 4630) +++ trunk/thirdparty/hunchentoot/specials.lisp 2011-01-21 19:01:44 UTC (rev 4631) @@ -315,9 +315,10 @@ "The default connection timeout used when an acceptor is reading from and writing to a socket stream.") -(define-symbol-macro *supports-threads-p* - #+:lispworks t - #-:lispworks bt:*supports-threads-p*) +(eval-when (:compile-toplevel :load-toplevel :execute) + (define-symbol-macro *supports-threads-p* + #+:lispworks t + #-:lispworks bt:*supports-threads-p*)) (defvar *global-session-db-lock* (load-time-value (and *supports-threads-p* (make-lock "global-session-db-lock"))) From bknr at bknr.net Fri Jan 21 19:07:58 2011 From: bknr at bknr.net (BKNR Commits) Date: Fri, 21 Jan 2011 20:07:58 +0100 Subject: [bknr-cvs] edi changed trunk/thirdparty/hunchentoot/ Message-ID: Revision: 4632 Author: edi URL: http://bknr.net/trac/changeset/4632 No content-type header U trunk/thirdparty/hunchentoot/CHANGELOG U trunk/thirdparty/hunchentoot/reply.lisp Modified: trunk/thirdparty/hunchentoot/CHANGELOG =================================================================== --- trunk/thirdparty/hunchentoot/CHANGELOG 2011-01-21 19:01:44 UTC (rev 4631) +++ trunk/thirdparty/hunchentoot/CHANGELOG 2011-01-21 19:07:58 UTC (rev 4632) @@ -1,3 +1,4 @@ +Allow no Content-Type header (Chaitanya Gupta) Patch for compilation with ECL (Sohail Somani) Fix DEFINE-EASY-HANDLER for multiple acceptors (Nicolas Neuss) Revived *SHOW-LISP-BACKTRACES-P* Modified: trunk/thirdparty/hunchentoot/reply.lisp =================================================================== --- trunk/thirdparty/hunchentoot/reply.lisp 2011-01-21 19:01:44 UTC (rev 4631) +++ trunk/thirdparty/hunchentoot/reply.lisp 2011-01-21 19:07:58 UTC (rev 4632) @@ -154,5 +154,5 @@ (setf (slot-value reply 'content-length) new-value)) (:method :after (new-value (name (eql :content-type)) &optional (reply *reply*)) "Special case for the `Content-Type' header." - (check-type new-value string) + (check-type new-value (or null string)) (setf (slot-value reply 'content-type) new-value))) From bknr at bknr.net Fri Jan 21 19:13:23 2011 From: bknr at bknr.net (BKNR Commits) Date: Fri, 21 Jan 2011 20:13:23 +0100 Subject: [bknr-cvs] edi changed trunk/thirdparty/drakma/ Message-ID: Revision: 4633 Author: edi URL: http://bknr.net/trac/changeset/4633 Handling of :filename U trunk/thirdparty/drakma/CHANGELOG.txt U trunk/thirdparty/drakma/request.lisp Modified: trunk/thirdparty/drakma/CHANGELOG.txt =================================================================== --- trunk/thirdparty/drakma/CHANGELOG.txt 2011-01-21 19:07:58 UTC (rev 4632) +++ trunk/thirdparty/drakma/CHANGELOG.txt 2011-01-21 19:13:23 UTC (rev 4633) @@ -1,3 +1,4 @@ +Better handling of optional filenames when uploading (Stas Boukarev) Don't funcall symbols that aren't FBOUNDP (Far? Rideau) Allowed disabling of SSL when building (Marko Kocic) Modified: trunk/thirdparty/drakma/request.lisp =================================================================== --- trunk/thirdparty/drakma/request.lisp 2011-01-21 19:07:58 UTC (rev 4632) +++ trunk/thirdparty/drakma/request.lisp 2011-01-21 19:13:23 UTC (rev 4633) @@ -112,10 +112,13 @@ (first value) (not (stringp (first value)))) (let* ((file-source (first value)) - (filename (or (if (functionp file-source) "user-closure") - (if (streamp file-source) "user-stream") - (getf (rest value) :filename) - (file-namestring file-source))) + (filename (or (getf (rest value) :filename) + (etypecase file-source + (function "user-closure") + (file-stream (or (file-namestring file-source) + "user-stream")) + (stream "user-stream") + (pathname (file-namestring file-source))))) (content-type (or (getf (rest value) :content-type) "application/octet-stream"))) (format stream "; filename=\"~A\"" filename) From bknr at bknr.net Fri Jan 21 19:17:37 2011 From: bknr at bknr.net (BKNR Commits) Date: Fri, 21 Jan 2011 20:17:37 +0100 Subject: [bknr-cvs] edi changed trunk/thirdparty/hunchentoot/ Message-ID: Revision: 4634 Author: edi URL: http://bknr.net/trac/changeset/4634 Export two functions U trunk/thirdparty/hunchentoot/CHANGELOG U trunk/thirdparty/hunchentoot/doc/index.xml U trunk/thirdparty/hunchentoot/packages.lisp Modified: trunk/thirdparty/hunchentoot/CHANGELOG =================================================================== --- trunk/thirdparty/hunchentoot/CHANGELOG 2011-01-21 19:13:23 UTC (rev 4633) +++ trunk/thirdparty/hunchentoot/CHANGELOG 2011-01-21 19:17:37 UTC (rev 4634) @@ -1,3 +1,4 @@ +Export two session functions (Nico de Jager) Allow no Content-Type header (Chaitanya Gupta) Patch for compilation with ECL (Sohail Somani) Fix DEFINE-EASY-HANDLER for multiple acceptors (Nicolas Neuss) Modified: trunk/thirdparty/hunchentoot/doc/index.xml =================================================================== --- trunk/thirdparty/hunchentoot/doc/index.xml 2011-01-21 19:13:23 UTC (rev 4633) +++ trunk/thirdparty/hunchentoot/doc/index.xml 2011-01-21 19:17:37 UTC (rev 4634) @@ -2273,6 +2273,28 @@ + + session + + session-id + + +The unique ID (an INTEGER) of the session. + + + + + + session + + universal-time + + +The time this session was started. + + + + Modified: trunk/thirdparty/hunchentoot/packages.lisp =================================================================== --- trunk/thirdparty/hunchentoot/packages.lisp 2011-01-21 19:13:23 UTC (rev 4633) +++ trunk/thirdparty/hunchentoot/packages.lisp 2011-01-21 19:17:37 UTC (rev 4634) @@ -243,8 +243,10 @@ "SESSION-DB" "SESSION-DB-LOCK" "SESSION-GC" + "SESSION-ID" "SESSION-MAX-TIME" "SESSION-REMOTE-ADDR" + "SESSION-START" "SESSION-TOO-OLD-P" "SESSION-USER-AGENT" "SESSION-VALUE" From bknr at bknr.net Fri Jan 21 22:31:40 2011 From: bknr at bknr.net (BKNR Commits) Date: Fri, 21 Jan 2011 23:31:40 +0100 Subject: [bknr-cvs] hans changed trunk/thirdparty/hunchentoot/ Message-ID: Revision: 4637 Author: hans URL: http://bknr.net/trac/changeset/4637 Improve error handling. Move code around in START-OUTPUT so that if content has been supplied, it is first converted to binary if necessary before anything is written to the client. Move error logging up to process-request. If START-OUTPUT fails, try logging and sending error information back to the client. U trunk/thirdparty/hunchentoot/acceptor.lisp U trunk/thirdparty/hunchentoot/headers.lisp U trunk/thirdparty/hunchentoot/request.lisp Modified: trunk/thirdparty/hunchentoot/acceptor.lisp =================================================================== --- trunk/thirdparty/hunchentoot/acceptor.lisp 2011-01-21 22:13:30 UTC (rev 4636) +++ trunk/thirdparty/hunchentoot/acceptor.lisp 2011-01-21 22:31:40 UTC (rev 4637) @@ -437,11 +437,6 @@ handler." (handler-bind ((error (lambda (cond) - (when *log-lisp-errors-p* - (log-message *lisp-errors-log-level* - "~A~@[~%~A~]" - cond - (and *log-lisp-backtraces-p* (get-backtrace)))) ;; if the headers were already sent, the error ;; happened within the body and we have to close ;; the stream Modified: trunk/thirdparty/hunchentoot/headers.lisp =================================================================== --- trunk/thirdparty/hunchentoot/headers.lisp 2011-01-21 22:13:30 UTC (rev 4636) +++ trunk/thirdparty/hunchentoot/headers.lisp 2011-01-21 22:31:40 UTC (rev 4637) @@ -70,22 +70,15 @@ (:method (key value) (write-header-line key (princ-to-string value)))) -(defun start-output (&key (content nil content-provided-p) - (request *request*)) +(defun start-output (&optional (content nil content-provided-p)) "Sends all headers and maybe the content body to *HUNCHENTOOT-STREAM*. Returns immediately and does nothing if called more than once per request. Handles the supported return codes accordingly. Called by PROCESS-REQUEST and/or SEND-HEADERS. Returns the stream to write to." - ;; send headers only once - (when *headers-sent* - (return-from start-output)) - (setq *headers-sent* t) - ;; Read post data to clear stream - Force binary mode to avoid OCTETS-TO-STRING overhead. - (raw-post-data :force-binary t) (let* ((return-code (return-code*)) (chunkedp (and (acceptor-output-chunking-p *acceptor*) - (eq (server-protocol request) :http/1.1) + (eq (server-protocol *request*) :http/1.1) ;; only turn chunking on if the content ;; length is unknown at this point... (null (or (content-length*) content-provided-p)) @@ -94,11 +87,11 @@ ;; own content (member return-code *approved-return-codes*))) (reason-phrase (reason-phrase return-code)) - (request-method (request-method request)) + (request-method (request-method *request*)) (head-request-p (eq request-method :head)) content-modified-p) (multiple-value-bind (keep-alive-p keep-alive-requested-p) - (keep-alive-p request) + (keep-alive-p *request*) (when keep-alive-p (setq keep-alive-p ;; use keep-alive if there's a way for the client to @@ -115,7 +108,7 @@ (cond (keep-alive-p (setf *close-hunchentoot-stream* nil) (when (and (acceptor-read-timeout *acceptor*) - (or (not (eq (server-protocol request) :http/1.1)) + (or (not (eq (server-protocol *request*) :http/1.1)) keep-alive-requested-p)) ;; persistent connections are implicitly assumed for ;; HTTP/1.1, but we return a 'Keep-Alive' header if the @@ -162,20 +155,14 @@ "The server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials \(e.g., bad password), or your browser doesn't understand how to supply the credentials required.") ((#.+http-forbidden+) (format nil "You don't have permission to access ~A on this server." - (escape-for-html (script-name request)))) + (escape-for-html (script-name *request*)))) ((#.+http-not-found+) (format nil "The requested URL ~A was not found on this server." - (escape-for-html (script-name request)))) + (escape-for-html (script-name *request*)))) ((#.+http-bad-request+) "Your browser sent a request that this server could not understand.") (otherwise "")) (address-string)))))) - ;; start with status line - (let ((first-line - (format nil "HTTP/1.1 ~D ~A" return-code reason-phrase))) - (write-sequence (map 'list #'char-code first-line) *hunchentoot-stream*) - (write-sequence +crlf+ *hunchentoot-stream*) - (maybe-write-to-header-stream first-line)) (when (and (stringp content) (not content-modified-p) (starts-with-one-of-p (or (content-type*) "") @@ -192,6 +179,18 @@ ;; the Content-Length header properly; maybe the user specified ;; a different content length, but that will wrong anyway (setf (header-out :content-length) (length content))) + ;; send headers only once + (when *headers-sent* + (return-from start-output)) + (setq *headers-sent* t) + ;; Read post data to clear stream - Force binary mode to avoid OCTETS-TO-STRING overhead. + (raw-post-data :force-binary t) + ;; start with status line + (let ((first-line + (format nil "HTTP/1.1 ~D ~A" return-code reason-phrase))) + (write-sequence (map 'list #'char-code first-line) *hunchentoot-stream*) + (write-sequence +crlf+ *hunchentoot-stream*) + (maybe-write-to-header-stream first-line)) ;; write all headers from the REPLY object (loop for (key . value) in (headers-out*) when value Modified: trunk/thirdparty/hunchentoot/request.lisp =================================================================== --- trunk/thirdparty/hunchentoot/request.lisp 2011-01-21 22:13:30 UTC (rev 4636) +++ trunk/thirdparty/hunchentoot/request.lisp 2011-01-21 22:31:40 UTC (rev 4637) @@ -212,26 +212,32 @@ "Standard implementation for processing a request. You should not change or replace this functionality unless you know what you're doing." - (let (*tmp-files* *headers-sent*) + (let (*tmp-files* + *headers-sent* + (*request* request)) (unwind-protect - (with-mapped-conditions () - (let* ((*request* request)) - (multiple-value-bind (body error backtrace) - ;; skip dispatch if bad request - (when (eql (return-code *reply*) +http-ok+) - (catch 'handler-done - (handle-request *acceptor* *request*))) - (when error - (setf (return-code *reply*) - +http-internal-server-error+)) - (start-output :content (cond ((and error *show-lisp-errors-p*) - (format nil "
~A~@[~%~%Backtrace:~A~]
" - (escape-for-html (format nil "~A" error)) - (when *show-lisp-backtraces-p* - (escape-for-html (format nil "~A" backtrace))))) - (error - "An error has occured.") - (t body)))))) + (with-mapped-conditions () + (labels + ((report-error-to-client (error &optional backtrace) + (setf (return-code *reply*) +http-internal-server-error+) + (when *log-lisp-errors-p* + (log-message *lisp-errors-log-level* "~A~@[~%~A~]" error backtrace)) + (start-output (if *show-lisp-errors-p* + (format nil "
~A
" (escape-for-html (format nil "~A" error))) + "An error has occured") ))) + (multiple-value-bind (body error backtrace) + ;; skip dispatch if bad request + (when (eql (return-code *reply*) +http-ok+) + (catch 'handler-done + (handle-request *acceptor* *request*))) + (when error + ;; error occured in request handler + (report-error-to-client error backtrace)) + (handler-case + (start-output body) + (error (e) + ;; error occured while writing to the client. attempt to report. + (report-error-to-client e)))))) (dolist (path *tmp-files*) (when (and (pathnamep path) (probe-file path)) ;; the handler may have chosen to (re)move the uploaded From bknr at bknr.net Fri Jan 21 22:08:11 2011 From: bknr at bknr.net (BKNR Commits) Date: Fri, 21 Jan 2011 23:08:11 +0100 Subject: [bknr-cvs] hans changed branches/hunchentoot-1.1.1/ Message-ID: Revision: 4635 Author: hans URL: http://bknr.net/trac/changeset/4635 temp branch A branches/hunchentoot-1.1.1/ From bknr at bknr.net Fri Jan 21 22:13:30 2011 From: bknr at bknr.net (BKNR Commits) Date: Fri, 21 Jan 2011 23:13:30 +0100 Subject: [bknr-cvs] hans changed branches/hunchentoot-1.1.1/ Message-ID: Revision: 4636 Author: hans URL: http://bknr.net/trac/changeset/4636 scrap that D branches/hunchentoot-1.1.1/ From bknr at bknr.net Sat Jan 22 06:51:03 2011 From: bknr at bknr.net (BKNR Commits) Date: Sat, 22 Jan 2011 07:51:03 +0100 Subject: [bknr-cvs] hans changed trunk/thirdparty/hunchentoot/request.lisp Message-ID: Revision: 4638 Author: hans URL: http://bknr.net/trac/changeset/4638 Observe *catch-errors-p* when invoking start-output. U trunk/thirdparty/hunchentoot/request.lisp Modified: trunk/thirdparty/hunchentoot/request.lisp =================================================================== --- trunk/thirdparty/hunchentoot/request.lisp 2011-01-21 22:31:40 UTC (rev 4637) +++ trunk/thirdparty/hunchentoot/request.lisp 2011-01-22 06:51:03 UTC (rev 4638) @@ -234,7 +234,8 @@ ;; error occured in request handler (report-error-to-client error backtrace)) (handler-case - (start-output body) + (with-debugger + (start-output body)) (error (e) ;; error occured while writing to the client. attempt to report. (report-error-to-client e)))))) From bknr at bknr.net Sun Jan 23 09:40:33 2011 From: bknr at bknr.net (BKNR Commits) Date: Sun, 23 Jan 2011 10:40:33 +0100 Subject: [bknr-cvs] hans changed trunk/thirdparty/hunchentoot/ Message-ID: Revision: 4639 Author: hans URL: http://bknr.net/trac/changeset/4639 Rework logging API, log to *error-output* by default. U trunk/thirdparty/hunchentoot/acceptor.lisp U trunk/thirdparty/hunchentoot/doc/index.xml U trunk/thirdparty/hunchentoot/headers.lisp U trunk/thirdparty/hunchentoot/log.lisp U trunk/thirdparty/hunchentoot/misc.lisp U trunk/thirdparty/hunchentoot/packages.lisp U trunk/thirdparty/hunchentoot/request.lisp U trunk/thirdparty/hunchentoot/session.lisp U trunk/thirdparty/hunchentoot/specials.lisp U trunk/thirdparty/hunchentoot/taskmaster.lisp Change set too large, please see URL above From bknr at bknr.net Tue Jan 25 11:43:07 2011 From: bknr at bknr.net (BKNR Commits) Date: Tue, 25 Jan 2011 12:43:07 +0100 Subject: [bknr-cvs] hans changed deployed/bos/projects/bos/m2/config.lisp Message-ID: Revision: 4640 Author: hans URL: http://bknr.net/trac/changeset/4640 change email address as requested by joscha U deployed/bos/projects/bos/m2/config.lisp Modified: deployed/bos/projects/bos/m2/config.lisp =================================================================== --- deployed/bos/projects/bos/m2/config.lisp 2011-01-23 09:40:32 UTC (rev 4639) +++ deployed/bos/projects/bos/m2/config.lisp 2011-01-25 11:43:07 UTC (rev 4640) @@ -53,7 +53,7 @@ ;; Mail-Stuff (defparameter *mail-sender* "mxm-automail at create-rainforest.org" "Absender f??r automatisch generierte Mails") -(defparameter *office-mail-address* "mxm-office at bos-deutschland.de" +(defparameter *office-mail-address* "mxm at bos-deutschland.de" "Empf??nger f??r Office-Mails") ;; Urkundenerzeugung