<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -23,7 +23,7 @@
 ;; Suite 330, Boston, MA  02111-1307  USA
 ;;
 ;;
-;; $Id: examples.cl,v 1.40 2007/04/17 22:05:04 layer Exp $
+;; $Id: examples.cl,v 1.41 2008/02/04 19:03:59 jkf Exp $
 
 ;; Description:
 ;;   Allegro iServe examples
@@ -74,7 +74,9 @@
 			 :p
 			 (:b &quot;Sample pages&quot;) :br
 			 ((:a :href &quot;gc&quot;) &quot;Garbage Collector Stats&quot;) :br
-			 ((:a :href &quot;apropos&quot;) &quot;Apropos&quot;)
+			 ((:a :href &quot;apropos&quot;) &quot;Apropos using get&quot;)
+			 :br
+			 ((:a :href &quot;apropos-post&quot;) &quot;Apropos using post&quot;)
 			 :br
 			 ((:a :href &quot;pic&quot;) &quot;Sample jpeg&quot;) :br
 			 ((:a :href &quot;pic-redirect&quot;) &quot;Redirect to previous picture&quot;) :br
@@ -412,6 +414,64 @@
 		     else (html &quot;Enter name and type enter&quot;)))
 		 :newline))))))
 
+(publish 
+ :path &quot;/apropos-post&quot;
+ :content-type &quot;text/html&quot;
+ :function
+ #'(lambda (req ent)
+     (let ((lookup (assoc &quot;symbol&quot; (request-query req) :test #'equal)))
+       (with-http-response (req ent)
+	 (with-http-body (req ent)
+	   (html (:head (:title &quot;Allegro Apropos&quot;))
+		 ((:body :background &quot;aserveweb/fresh.jpg&quot;)
+		  &quot;New Apropos of &quot;
+		  ((:form :action &quot;apropos-post&quot;
+			  :method &quot;post&quot;)
+		   ((:input :type &quot;text&quot;
+			    :maxlength 40
+			    :size 20
+			    :name &quot;symbol&quot;)))
+		  #+allegro
+		  &quot; The apropos function in ACL is case sensitive.&quot;
+		  :p
+			
+		  (if* lookup
+		     then (html :hr (:b &quot;Apropos&quot;) &quot; of &quot; 
+				(:princ-safe (cdr lookup))
+				:br
+				:br)
+			  (let ((ans (apropos-list (cdr lookup))))
+			    (if* (null ans)
+			       then (html &quot;No Match Found&quot;)
+			       else (macrolet ((my-td (str)
+						 `(html ((:td 
+							  :bgcolor &quot;blue&quot;)
+							 ((:font :color &quot;white&quot;
+								 :size &quot;+1&quot;)
+							  (:b ,str))))))
+						       
+				      (html ((:table
+					      :bgcolor &quot;silver&quot;
+					      :bordercolor &quot;blue&quot;
+					      :border 3
+					      :cellpadding 3
+					      )
+						   
+					     (:tr
+					      (my-td &quot;Symbol&quot;)
+					      (my-td &quot;boundp&quot;)
+					      (my-td &quot;fboundp&quot;))
+						 
+						   
+					     (dolist (val ans)
+					       (html (:tr 
+						      (:td (:prin1-safe val))
+						      (:td (:prin1 (and (boundp val) t)))
+						      (:td (:prin1 (and (fboundp val) t))))
+						     :newline)))))))
+		     else (html &quot;Enter name and type enter&quot;)))
+		 :newline))))))
+
 
 ;; a preloaded picture file
 (publish-file :path &quot;/aserveweb/fresh.jpg&quot;</diff>
      <filename>examples/examples.cl</filename>
    </modified>
    <modified>
      <diff>@@ -24,7 +24,7 @@
 ;; Suite 330, Boston, MA  02111-1307  USA
 ;;
 ;;
-;; $Id: log.cl,v 1.26 2007/04/17 22:05:04 layer Exp $
+;; $Id: log.cl,v 1.27 2008/02/04 19:03:59 jkf Exp $
 
 ;; Description:
 ;;   iserve's logging
@@ -37,6 +37,8 @@
 
 (defvar *enable-logging* t) ; to turn on/off the standard logging method
 
+(defvar *save-commands* nil) ; if true then a stream to which to write commands
+
 (defmethod logmess (message)
   ;; send log message to the default vhost's error stream 
   (logmess-stream message (vhost-error-stream
@@ -137,7 +139,30 @@
 			; get the stream again
 			(setq stream (vhost-log-stream (request-vhost req)))
 			(do-log))
-		 else (do-log))))))
+		 else (do-log)))))
+  
+  (if* *save-commands*
+     then (multiple-value-bind (ok whole uri-string)
+	      (match-re &quot;^[^ ]+\\s+([^ ]+)&quot; (request-raw-request req))
+	    (declare (ignore ok whole))
+	    (format *save-commands*
+		    &quot;((:method . ~s) (:uri . ~s) (:proto . ~s) ~% (:code . ~s)~@[~% (:body . ~s)~]~@[~% (:auth .  ~s)~]~@[~% (:ctype . ~s)~])~%&quot; 
+		    (request-method req)
+		    uri-string
+		    (request-protocol req)
+		    (let ((obj (request-reply-code req)))
+		      (if* obj
+			 then (response-number obj)
+			 else 999))
+		    (let ((bod (request-request-body req)))
+		      (and (not (equal &quot;&quot; bod)) bod))
+		    (multiple-value-list (get-basic-authorization req))
+		    (header-slot-value req :content-type)
+		    ))
+	  (force-output *save-commands*))
+		  
+	  
+  )
 
 	    	
     </diff>
      <filename>log.cl</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>d4267a326db86ceef80b2e50c1b2c51034da64b5</id>
    </parent>
  </parents>
  <author>
    <name>jkf</name>
    <email>jkf</email>
  </author>
  <url>http://github.com/franzinc/aserve/commit/3f9e5362951bd2b17629c9856e82f01507af24ed</url>
  <id>3f9e5362951bd2b17629c9856e82f01507af24ed</id>
  <committed-date>2008-02-04T11:03:59-08:00</committed-date>
  <authored-date>2008-02-04T11:03:59-08:00</authored-date>
  <message>checkpoint</message>
  <tree>417f10a9bdb2a5a52a8f87aaed7afe50f3a39eb3</tree>
  <committer>
    <name>jkf</name>
    <email>jkf</email>
  </committer>
</commit>
