間違ってたので修正。Livedoorも上手くいくようになった。
(pushnew (cons "application" "atom+xml") *text-content-types* :test #'equal) (defun make-x-wsse-header (user pass) (let* ((created (multiple-value-bind (sec min hr day mon year dow daylight-p zone) (decode-universal-time (get-universal-time)) (declare (ignore daylight-p zone)) (format nil "~4,'0d-~2,'0d-~2,'0dT~2,'0d:~2,'0d:~2,'0dZ" year mon day hr min sec))) (nonce (cl-base64:usb8-array-to-base64-string (ironclad:digest-sequence :sha1 (ironclad:ascii-string-to-byte-array (kmrcl:random-string :length 40))))) (digest (cl-base64:usb8-array-to-base64-string (ironclad:digest-sequence :sha1 (ironclad:ascii-string-to-byte-array (concatenate 'string nonce created pass)))))) (concatenate 'string "UsernameToken " "Username=\"" user "\", " "PasswordDigest=\"" digest "\", " "Nonce=\"" nonce "\", " "Created=\"" created "\""))) ;; http://f.hatena.ne.jp/atom ;; http://livedoor.blogcms.jp/atom/service (defun get-atompub (url user pass) (drakma:http-request url :additional-headers (list (cons "X-WSSE" (make-x-wsse-header user pass)))))
2 件のコメント:
やっぱり上手く動いてないっぽい。どこが悪いんだろう??
修正してちゃんと動きました
コメントを投稿