Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes and amendments.

  • Loading branch information...
commit 6074ace847a1c4fd50120f9048d8f1226df9382c 1 parent 56d4238
@skypher authored
View
3  src/core/consumer.lisp
@@ -19,6 +19,7 @@ it has query params already they are added onto it."
(mapcar (compose #'url-encode #'cdr) parameters)))))
(defun http-request (uri &key (request-method :post) parameters drakma-args)
+ ;; TODO handle redirects properly
(let* ((param-string-encoded (alist->query-string parameters :include-leading-ampersand nil :url-encode t)))
(case request-method
(:get
@@ -73,7 +74,7 @@ token."
(equal (car e1) e2)))))
(assert key)
(assert secret)
- (make-request-token :consumer consumer-token :key key :secret secret
+ (make-request-token :consumer consumer-token :key key :secret secret ;; TODO url-decode
:callback-uri callback-uri :user-data user-data))
(error "Server returned status ~D" status))))) ; TODO: elaborate
View
1  src/util/query-string.lisp
@@ -13,6 +13,7 @@
(defun query-string->alist (query-string)
;; TODO: doesn't handle leading ?
+ (check-type query-string string)
(let* ((kv-pairs (remove "" (split-sequence #\& query-string) :test #'equal))
(alist (mapcar (lambda (kv-pair)
(let ((kv (split-sequence #\= kv-pair)))
View
3  src/util/uri.lisp
@@ -115,5 +115,6 @@ the external format EXTERNAL-FORMAT."
(t
(concatenate 'string ":" (princ-to-string port))))
path)
- (query-string->alist (puri:uri-query uri)))))
+ (awhen (puri:uri-query uri)
+ (query-string->alist it)))))
Please sign in to comment.
Something went wrong with that request. Please try again.