Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions aws-sign4.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,10 @@ parameter ESCAPE% is NIL, the % is not escaped."

(defun create-canonical-query-string (params)
(format nil "~{~A~^&~}"
(sort (loop for (key . value) in params
collect (format nil "~A=~A"
(url-encode (string key))
(url-encode (princ-to-string value))))
#'string<)))
(loop for (key . value) in (sort (copy-seq params) #'string< :key #'car)
collect (format nil "~A=~A"
(url-encode (string key))
(url-encode (princ-to-string value))))))

(defun trimall (string)
(string-trim '(#\Space #\Tab) string))
Expand Down