diff options
author | Vivien Kraus <vivien@planete-kraus.eu> | 2021-10-21 12:00:27 +0200 |
---|---|---|
committer | Vivien Kraus <vivien@planete-kraus.eu> | 2021-11-14 16:49:56 +0000 |
commit | b12017773429fb07266e996a5802283088f8634c (patch) | |
tree | 7ec16ab7ba2b46578736cee99756490b3248ec9f | |
parent | 05b218e382add93b85ee7ff6de43502b96243c16 (diff) |
fixup! Debug
-rw-r--r-- | src/scm/webid-oidc/server/endpoint/identity-provider.scm | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/scm/webid-oidc/server/endpoint/identity-provider.scm b/src/scm/webid-oidc/server/endpoint/identity-provider.scm index 8659977..8ff2089 100644 --- a/src/scm/webid-oidc/server/endpoint/identity-provider.scm +++ b/src/scm/webid-oidc/server/endpoint/identity-provider.scm @@ -280,11 +280,19 @@ (and (match (request-content-type request) ((or 'application/x-www-form-urlencoded ('application/x-www-form-urlencoded _ ...)) + (format (current-error-port) "The content-type is OK.\n") #t) - (else #f)) + (else + (format (current-error-port) "The content-type is not OK: ~s\n" (request-content-type request)) + #f)) (if (bytevector? request-body) - (false-if-exception - (utf8->string request-body)) + (with-exception-handler + (lambda (exn) + (format (current-error-port) "The request body is not UTF-8: ~s\n" exn) + #f) + (lambda () + (utf8->string request-body)) + #:unwind? #t) request-body)) #t))) (format (current-error-port) "Arguments: ~s ~s\n" query-args form-args) |