From ba2bc3e34026fb17fede699e4f45829003dfcede Mon Sep 17 00:00:00 2001 From: Federico Tedin Date: Sat, 4 Jan 2025 20:13:14 +0100 Subject: [PATCH] Attempt fix --- test/verb-test.el | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/test/verb-test.el b/test/verb-test.el index 8c83aa4..90db54f 100644 --- a/test/verb-test.el +++ b/test/verb-test.el @@ -2380,14 +2380,17 @@ (ert-deftest test-default-headers () (server-test "sorted-headers" (let ((headers '("mime-version" - "connection" - "content-length" - "host" - "accept" - "accept-encoding"))) + "connection" + "content-length" + "host" + "accept"))) + ;; Only append this header if we can decode gzip + (when url-mime-encoding-string + (push "accept-encoding" headers)) + (dolist (h headers) - (goto-char (point-min)) - (should (search-forward (concat h ": ")))) + (goto-char (point-min)) + (should (search-forward (concat h ": ")))) (goto-char (point-min)) (delete-matching-lines "cookie") ; Ignore cookie header. @@ -2396,7 +2399,7 @@ (delete-matching-lines "extension") ; Ignore extension header. (should (= (count-lines (point-min) (point-max)) - (length headers)))))) + (length headers)))))) (defconst test-json (join-lines "{" " \"foo\": {"