aboutsummaryrefslogtreecommitdiff
path: root/src/protocol.lisp
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2024-11-28 22:31:29 -0800
committercolin <colin@cicadas.surf>2024-11-28 22:31:29 -0800
commit33f7f7c3f45e58933b6c2ed448f24618f089511c (patch)
treed1a8e3f5f9f33479648b44ab70e4634b622bf95b /src/protocol.lisp
parentdd99f55b19fef478e792c6c6a6b5d360d679c8fa (diff)
print-debug tweaks
Diffstat (limited to 'src/protocol.lisp')
-rw-r--r--src/protocol.lisp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/protocol.lisp b/src/protocol.lisp
index dfee2e6..3a4f3ec 100644
--- a/src/protocol.lisp
+++ b/src/protocol.lisp
@@ -170,13 +170,19 @@ INITARG values MUST BE A KEYWORD.")
this. Called before handling, should be used to supply
user-identifying data to the endpoint instance that might be needed by
the handle function.")
- (:method ((ep t)) t))
+ (:method ((ep t)) t)
+ (:method :around ((ep t))
+ (debug-print :authenticating ep)
+ (call-next-method)))
(defgeneric authorize (endpoint)
(:documentation "Returns a boolean. Any endpoint requiring special ownership
permissions should implement this. Called before handling and after
authenticate.")
- (:method ((ep t)) t))
+ (:method ((ep t)) t)
+ (:method :around ((ep t))
+ (debug-print :authorizing ep)
+ (call-next-method)))
(defgeneric handle (endpoint)
(:documentation "The beef of the endpoint handling protocol.
@@ -197,8 +203,10 @@ successfully.
This method should return data to be sent back to the client and
MUST be implemented for every endpoint class.")
(:method :around ((endpoint t))
- (debug-print :handle endpoint)
+ (debug-print :handling endpoint)
(prog1 (call-next-method)
+ (debug-print :content-type (http:content-type*)
+ :content-length (http:content-length*))
(debug-print)))
(:method :before ((endpoint t))