Only in hunchentoot-1.1.1: .log.lisp.un~ Only in hunchentoot-1.1.1: .specials.lisp.un~ Only in hunchentoot-1.1.1/doc: .DS_Store diff -ur orig/hunchentoot-1.1.1/doc/index.xml hunchentoot-1.1.1/doc/index.xml --- orig/hunchentoot-1.1.1/doc/index.xml 2010-08-24 16:21:27.000000000 +0900 +++ hunchentoot-1.1.1/doc/index.xml 2010-11-25 20:07:43.000000000 +0900 @@ -154,7 +154,7 @@ thanks to Pierre Thierry.
- Lu�s Oliveira maintains an
+ Lu?s Oliveira maintains an
unofficial darcs repository of
Hunchentoot at
http://common-lisp.net/~loliveira/ediware/.
@@ -181,7 +181,7 @@
This will tunnel all requests where the URI path begins with
"/hunchentoot"
to a (Hunchentoot) server listening on
- port�3000 on the same machine.
+ port?3000 on the same machine.
Of course, there are @@ -205,7 +205,7 @@ common-lisp.net. You can search the devel mailing list here - (thanks to Tiarn�n � Corr�in). + (thanks to Tiarn?n ? Corr?in).
If you want to send patches, please read this first. @@ -273,7 +273,7 @@
(session-max-time�session)
seconds.
+the last (session-max-time?session)
seconds.
- If NIL
, a
- 302�status code will be sent to the client.
+ 302?status code will be sent to the client.
If "Hunchentoot"
.
Unfortunately, Jeff is at least as busy as I am so he didn't - find the time to finish a full release. But in spring�2004 I + find the time to finish a full release. But in spring?2004 I needed a documented version of the code for a client of mine who thought it would be good if the toolkit were publicly available under an open source license. So I took Jeff's code, refactored again (to sync with the changes I had done in the meantime), and - added documentation. This resulted in TBNL�0.1.0 (which + added documentation. This resulted in TBNL?0.1.0 (which initially required mod_lisp as its front-end).
- In March�2005, Bob Hutchinson sent patches which enabled TBNL to + In March?2005, Bob Hutchinson sent patches which enabled TBNL to use other front-ends than mod_lisp. This made me aware that TBNL was already almost a full web server, so eventually I wrote Hunchentoot which was a full web - server, implemented as a wrapper around TBNL. Hunchentoot�0.1.0 + server, implemented as a wrapper around TBNL. Hunchentoot?0.1.0 was released at the end of 2005 and was originally LispWorks-only.
- Hunchentoot�0.4.0, released in October�2006, was the first + Hunchentoot?0.4.0, released in October?2006, was the first release which also worked with other Common Lisp implementations. It is a major rewrite and also incorporates most of TBNL and replaces it completely.
- Hunchentoot�1.0.0, released in February 2009, is again a major + Hunchentoot?1.0.0, released in February 2009, is again a major rewrite and should be considered work in progress. It moved to using the usocket @@ -3101,7 +3129,7 @@ backwards-compatible) were made to ease customization of Hunchentoot's behaviour. A significant part of the 1.0.0 redesign was done - by Hans H�bner. + by Hans H?bner.
@@ -3124,11 +3152,11 @@ TBNL, to Michael Weber for initial file upload code, and to Janis Dzerins for - his RFC�2388 + his RFC?2388 code. Thanks to Bob Hutchison for his code for multiple front-ends (which made me realize that TBNL was already pretty close to a "real" web server) and the initial UTF-8 example. - Thanks to Hans H�bner + Thanks to Hans H?bner for a lot of architectural and implementation enhancements for the 1.0.0 release and also for transferring the documentation to sane XHTML. Thanks to John diff -ur orig/hunchentoot-1.1.1/headers.lisp hunchentoot-1.1.1/headers.lisp --- orig/hunchentoot-1.1.1/headers.lisp 2010-08-23 04:33:01.000000000 +0900 +++ hunchentoot-1.1.1/headers.lisp 2010-11-25 20:06:30.000000000 +0900 @@ -204,10 +204,11 @@ (maybe-write-to-header-stream "") ;; access log message (when-let (access-logger (acceptor-access-logger *acceptor*)) - (funcall access-logger - :return-code return-code - :content content - :content-length (content-length*))) + (when (not (no-log-p request)) + (funcall access-logger + :return-code return-code + :content content + :content-length (content-length*)))) ;; now optional content (unless (or (null content) head-request-p) (write-sequence content *hunchentoot-stream*)) diff -ur orig/hunchentoot-1.1.1/log.lisp hunchentoot-1.1.1/log.lisp --- orig/hunchentoot-1.1.1/log.lisp 2010-01-08 21:00:22.000000000 +0900 +++ hunchentoot-1.1.1/log.lisp 2010-11-25 20:01:18.000000000 +0900 @@ -89,6 +89,10 @@ This is the function which Hunchentoot itself uses to log errors it catches during request processing." - (when-let (message-logger (acceptor-message-logger *acceptor*)) +(when-let (message-logger (acceptor-message-logger *acceptor*)) (apply message-logger log-level format-string format-arguments))) +(defun no-log-p (request) + (some #'identity (loop for x in *no-log-request-matchers* + collect (funcall x request)))) + diff -ur orig/hunchentoot-1.1.1/packages.lisp hunchentoot-1.1.1/packages.lisp --- orig/hunchentoot-1.1.1/packages.lisp 2010-08-23 04:33:01.000000000 +0900 +++ hunchentoot-1.1.1/packages.lisp 2010-11-25 20:04:48.000000000 +0900 @@ -64,6 +64,7 @@ "*LOG-LISP-WARNINGS-P*" "*MESSAGE-LOG-PATHNAME*" "*METHODS-FOR-POST-PARAMETERS*" + "*NO-LOG-REQUEST-MATCHERS*" "*REPLY*" "*REQUEST*" "*REWRITE-FOR-SESSION-URLS*" @@ -161,6 +162,9 @@ "CREATE-FOLDER-DISPATCHER-AND-HANDLER" "CREATE-PREFIX-DISPATCHER" "CREATE-REGEX-DISPATCHER" + "CREATE-REQUEST-REMOTE-ADDR*-MATCHER" + "CREATE-REQUEST-USER-AGENT-MATCHER" + "CREATE-REQUEST-SCRIPT-NAME*-MATCHER" "CREATE-STATIC-FILE-DISPATCHER-AND-HANDLER" "DEFAULT-DISPATCHER" "DEFINE-EASY-HANDLER" diff -ur orig/hunchentoot-1.1.1/request.lisp hunchentoot-1.1.1/request.lisp --- orig/hunchentoot-1.1.1/request.lisp 2010-02-17 15:12:43.000000000 +0900 +++ hunchentoot-1.1.1/request.lisp 2010-11-25 20:10:29.000000000 +0900 @@ -549,3 +549,25 @@ (delete symbol (aux-data request) :key #'car :test #'eq))) (values)) + +(defun create-request-remote-addr*-matcher (regex) + "Creates a request matcher function which will match the + CL-PPCRE regular expression REGEX to the request's remote-addr*." + (let ((scanner (create-scanner regex))) + (lambda (request) + (not (null (scan scanner (remote-addr* request))))))) + +(defun create-request-user-agent-matcher (regex) + "Creates a request matcher function which will match the + CL-PPCRE regular expression REGEX to the request's User-Agent." + (let ((scanner (create-scanner regex))) + (lambda (request) + (not (null (scan scanner (user-agent request))))))) + +(defun create-request-script-name*-matcher (regex) + "Creates a request matcher function which will match the + CL-PPCRE regular expression REGEX to the request's script-name*." + (let ((scanner (create-scanner regex))) + (lambda (request) + (not (null (scan scanner (script-name* request))))))) + diff -ur orig/hunchentoot-1.1.1/specials.lisp hunchentoot-1.1.1/specials.lisp --- orig/hunchentoot-1.1.1/specials.lisp 2010-04-07 15:45:06.000000000 +0900 +++ hunchentoot-1.1.1/specials.lisp 2010-11-25 20:06:21.000000000 +0900 @@ -340,3 +340,6 @@ (defun hyperdoc-lookup (symbol type) (declare (ignore type)) (cdr (assoc symbol exported-symbols-alist :test #'eq)))) + +(defvar *no-log-request-matchers* nil + "A global matchers list for match requests,which will not be write to log.")