From 26620cf36bd1e0e173fde2c91b188155649bd2b1 Mon Sep 17 00:00:00 2001 From: eta Date: Fri, 19 Jun 2020 12:15:39 +0100 Subject: [PATCH] add Content-Length header when doing uploads --- stuff.lisp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stuff.lisp b/stuff.lisp index 46c29d3..693512c 100644 --- a/stuff.lisp +++ b/stuff.lisp @@ -774,6 +774,7 @@ MEDIA-TYPE is one of (:image :video :audio :document)." (multiple-value-bind (body status-code) (drakma:http-request put-url :additional-headers headers + :content-length (file-length file-data) :content-type mime-type :method :put :content decrypted-file) @@ -805,6 +806,7 @@ MEDIA-TYPE is one of (:image :video :audio :document)." (drakma:http-request put-url :additional-headers headers :content-type "image/png" + :content-length (file-length stream) :method :put :content path) (unless (and (>= status-code 200) (< status-code 300))