Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Patch Hunchentoot to make it respond with plain text url on 302 redirect. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | trunk |
Files: | files | file ages | folders |
SHA3-256: |
53613363dd7c08898760109815ab6742 |
User & Date: | anon 2020-06-08 16:34:14 |
Context
2020-06-08
| ||
16:34 | Patch Hunchentoot to make it respond with plain text url on 302 redirect. Leaf check-in: 53613363dd user: anon tags: trunk | |
03:48 | Initial commit check-in: 7906057d63 user: anon tags: trunk | |
Changes
Added patch-acceptor.lisp.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
--- acceptor.lisp.orig 2020-06-07 12:47:37.057549000 +0000 +++ acceptor.lisp 2020-06-07 16:34:01.016307000 +0000 @@ -682,19 +682,17 @@ (defun make-cooked-message (http-status-code &key error backtrace) (labels ((cooked-message (format &rest arguments) - (setf (content-type*) "text/html; charset=iso-8859-1") - (format nil "<html><head><title>~D ~A</title></head><body><h1>~:*~A</h1>~?<p><hr>~A</p></body></html>" - http-status-code (reason-phrase http-status-code) + (setf (content-type*) "text/plain; charset=iso-8859-1") + (format nil "~A/raw" format (mapcar (lambda (arg) (if (stringp arg) (escape-for-html arg) arg)) - arguments) - (address-string)))) + arguments) ))) (case http-status-code ((#.+http-moved-temporarily+ #.+http-moved-permanently+) - (cooked-message "The document has moved <a href='~A'>here</a>" (header-out :location))) + (cooked-message (header-out :location))) ((#.+http-authorization-required+) (cooked-message "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 ~ @@ -709,7 +707,7 @@ (cooked-message "Your browser sent a request that this server could not understand.")) ((#.+http-internal-server-error+) (if *show-lisp-errors-p* - (cooked-message "<pre>~A~@[~%~%Backtrace:~%~%~A~]</pre>" + (cooked-message "~A~@[~%~%Backtrace:~%~%~A~]" (escape-for-html (princ-to-string error)) (when *show-lisp-backtraces-p* (escape-for-html (princ-to-string backtrace)))) |