Only in tbnl-0.3.10: cookie.fasl diff -ur tbnl-0.3.10-orig/doc/index.html tbnl-0.3.10/doc/index.html --- tbnl-0.3.10-orig/doc/index.html 2005-01-24 06:48:13.000000000 -0500 +++ tbnl-0.3.10/doc/index.html 2005-02-21 11:54:29.000000000 -0500 @@ -86,6 +86,7 @@
  • get-parameters
  • post-parameter
  • post-parameters +
  • raw-post-data
  • parameter
  • header-in
  • headers-in @@ -216,6 +217,7 @@
  • read-from-string*
  • http-token-p
  • *tmp-directory* +
  • *save-raw-post-data-p*
  • Debugging TBNL applications
      @@ -624,6 +626,16 @@


      [Function] +
      raw-post-data &optional request => string + +


      +If
      *SAVE-RAW-POST-DATA-P* is +true and the request is a POST request, returns the raw body of +the request, otherwise returns nil. +
      + +


      [Function]
      parameter name &optional request => string


      @@ -1490,6 +1502,16 @@ This should be a pathname denoting a directory where temporary files can be stored. It is used for file uploads.
      +


      [Special variable] +
      *save-raw-post-data-p* + +


      +If this variable is set to a true value (the default is +NIL), when a POST request is received, the raw body is +saved, and may be retrieved with RAW-POST-DATA.
      +

      Debugging TBNL applications

      If you want to debug your TBNL applications it is recommend that you start Apache (i.e. the httpd binary) with the -X command-line option. Then set *DEBUG-MODE* to a true value and poke around in the listener. Good luck... :) Only in tbnl-0.3.10/doc: index.html~ Only in tbnl-0.3.10: html.fasl Only in tbnl-0.3.10: log.fasl Only in tbnl-0.3.10: modlisp.fasl Only in tbnl-0.3.10: packages.fasl diff -ur tbnl-0.3.10-orig/packages.lisp tbnl-0.3.10/packages.lisp --- tbnl-0.3.10-orig/packages.lisp 2005-01-24 06:50:46.000000000 -0500 +++ tbnl-0.3.10/packages.lisp 2005-02-21 11:31:57.000000000 -0500 @@ -46,6 +46,7 @@ #:*lisp-warnings-log-level* #:*listener* #:*log-lisp-backtraces-p* + #:*save-raw-post-data-p* #:*log-lisp-errors-p* #:*log-lisp-warnings-p* #:*log-prefix* @@ -130,6 +131,7 @@ #:get-parameter #:get-parameters #:handle-if-modified-since + #:raw-post-data #:header-in #:headers-in #:header-out Only in tbnl-0.3.10: packages.lisp~ Only in tbnl-0.3.10: reply.fasl Only in tbnl-0.3.10: request.fasl diff -ur tbnl-0.3.10-orig/request.lisp tbnl-0.3.10/request.lisp --- tbnl-0.3.10-orig/request.lisp 2005-01-24 06:50:46.000000000 -0500 +++ tbnl-0.3.10/request.lisp 2005-02-21 11:57:38.000000000 -0500 @@ -50,7 +50,10 @@ (session :initform nil :accessor session :documentation "The session object associated with this -request.")) +request.") + (raw-post-data :initform nil + :documentation "The raw string sent as the body of a +POST request, populated only if *SAVE-RAW-POST-DATA-P* is non-nil.")) (:documentation "Objects of this class hold all the information about an incoming request. They are created automatically by TBNL and can be accessed by the corresponding handler.")) @@ -114,6 +117,8 @@ (let ((content (make-string (parse-integer content-length :junk-allowed t)))) (read-sequence content content-stream) + (when *save-raw-post-data-p* + (setf (slot-value request 'raw-post-data) content)) content))))) ((starts-with-p content-type "multipart/form-data;" :test #'char-equal) (handler-case @@ -309,3 +314,6 @@ (setf (return-code) +http-not-modified+) (throw 'tbnl-handler-done nil)) (values))) + +(defun raw-post-data (&optional (request *request*)) + (slot-value request 'raw-post-data)) Only in tbnl-0.3.10: request.lisp.orig Only in tbnl-0.3.10: request.lisp~ Only in tbnl-0.3.10: rfc2388.fasl Only in tbnl-0.3.10: session.fasl Only in tbnl-0.3.10: specials.fasl diff -ur tbnl-0.3.10-orig/specials.lisp tbnl-0.3.10/specials.lisp --- tbnl-0.3.10-orig/specials.lisp 2005-01-24 06:50:46.000000000 -0500 +++ tbnl-0.3.10/specials.lisp 2005-02-21 11:26:27.000000000 -0500 @@ -182,6 +182,10 @@ occurs. Will only have effect of *LOG-LISP-ERRORS-P* or *LOG-LISP-BACKTRACES* are also true.") +(defvar *save-raw-post-data-p* nil + "Whether the body of a POST request is made available through +RAW-POST-DATA.") + (defvar-unbound *command* "The current request as read from Apache/mod_lisp, converted into an alist.") Only in tbnl-0.3.10: specials.lisp~ Only in tbnl-0.3.10: util.fasl