Browse files

Problem report fix.

  • Loading branch information...
1 parent 952d5bb commit da4519dfae77947f3d95667cb7549bc5003a9475 @skypher committed Feb 9, 2010
Showing with 6 additions and 4 deletions.
  1. +2 −0 README
  2. +4 −4 src/core/consumer.lisp
@@ -33,6 +33,8 @@ Consumer:
* Revoking tokens as per section 7 of the Session extension
+ * Problem Reporting extension: fields in body are ignored.
* crypto signatures different from HMAC-SHA1. It's easy to use
@@ -209,7 +209,7 @@ token. POST is recommended as request method. [6.3.1]" ; TODO 1.0a section numbe
(let ((parameters (mapcar (lambda (token)
(destructuring-bind (name value)
(split-sequence #\= token)
- (cons name value)))
+ (cons name (string-trim '(#\") value))))
(subseq authenticate-header 6)))))
@@ -235,7 +235,7 @@ validity before the request is made. Should the server notify us that
it has prematurely expired the token will be refresh as well and the
request sent again using the new token. ON-REFRESH will be called
whenever the access token is renewed."
- ;(setf access-token (maybe-refresh-access-token access-token on-refresh))
+ (setf access-token (maybe-refresh-access-token access-token on-refresh))
(multiple-value-bind (normalized-uri query-string-parameters) (normalize-uri uri)
(let* ((parameters (append query-string-parameters
@@ -258,8 +258,8 @@ whenever the access token is renewed."
(if (eql status 200)
(values body status)
(let* ((problem-report (get-problem-report headers body))
- (problem-hint (cdr (assoc "oauth_problem" problem-report)))
- (problem-advice (cdr (assoc "oauth_problem_advice" problem-report))))
+ (problem-hint (cdr (assoc "oauth_problem" problem-report :test #'equalp)))
+ (problem-advice (cdr (assoc "oauth_problem_advice" problem-report :test #'equalp))))
((and (eql status 401)
(equalp problem-hint "token_expired"))

0 comments on commit da4519d

Please sign in to comment.