summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjournal.lisp23
-rw-r--r--main.lisp2
2 files changed, 24 insertions, 1 deletions
diff --git a/journal.lisp b/journal.lisp
index 2ca1919..fa56b3f 100755
--- a/journal.lisp
+++ b/journal.lisp
@@ -288,7 +288,8 @@
("Query" . ,*query*)
("Query string" . ,(http-get-query-string))
("Subpath" . ,*subpath*)
- ("Environment" . ,(http-get-env-vars)))
+ ("Environment" . ,(http-get-env-vars))
+ #+clisp ("Environment #2" . ,(ext:getenv)))
do (<:p
(<:hr)
(<:h2 (<:as-html x))
@@ -296,3 +297,23 @@
(<:pre (<:as-html (prin1-to-string y)))))))
#.(restore-sql-reader-syntax-state))
+
+(defun show-debugging-page ()
+ (http-add-header "Content-Language" "de")
+ (http-send-headers "text/html; charset=UTF-8")
+
+ (<xhtml :xmlns "http://www.w3.org/1999/xhtml"
+ :lang "de"
+ (when *debugging-p*
+ (loop for (x . y) in `(("Action" . ,*action*)
+ ("Request method" . ,*method*)
+ ("Query" . ,*query*)
+ ("Query string" . ,(http-get-query-string))
+ ("Subpath" . ,*subpath*)
+ ("Environment" . ,(http-get-env-vars))
+ #+clisp ("Environment #2" . ,(ext:getenv)))
+ do (<:p
+ (<:hr)
+ (<:h2 (<:as-html x))
+ (<:p "Type " (<:em (<:as-html (type-of y))) ".")
+ (<:pre (<:as-html (prin1-to-string y))))))))
diff --git a/main.lisp b/main.lisp
index d8ae683..a16e1ed 100644
--- a/main.lisp
+++ b/main.lisp
@@ -48,6 +48,7 @@
(*action* (or (keywordify (getf *query* :action))
(cond (*post-number* :view)
((string= "feed" (first *subpath*)) :view-atom-feed)
+ ((string= "debug" (first *subpath*)) :view-debugging-page)
(t nil))))
(*method* (keywordify (gethash "REQUEST_METHOD" *http-env*)))
(*script-filename* (pathname-as-file
@@ -102,6 +103,7 @@
(update-records-from-instance entry)))
(show-web-journal))
(:view-atom-feed (show-atom-feed))
+ (:view-debugging-page (show-debugging-page))
(otherwise (show-web-journal)))))))