branch: elpa/fedi
commit 06cb312ef4acf6f35df3eb1f071b46d0a0384fae
Author: marty hiatt <[email protected]>
Commit: marty hiatt <[email protected]>

    http post: append headers /extra headers.
---
 fedi-http.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fedi-http.el b/fedi-http.el
index 629c9e7df10..ca3e5526e9c 100644
--- a/fedi-http.el
+++ b/fedi-http.el
@@ -167,8 +167,9 @@ json-string PARAMS."
                                 ("Accept" . "application/json")))
                     '(("Content-Type" . "application/x-www-form-urlencoded"))))
          (url-request-extra-headers
-          (append url-request-extra-headers ; set in macro
-                  headers)))
+          (if (not url-request-extra-headers)
+              headers ;; no need to add anything
+            (append headers  url-request-extra-headers))))
     (with-temp-buffer
       (fedi-http--url-retrieve-synchronously url silent))))
 

Reply via email to