File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change 681681 {:accept-encoding [:identity :gzip ]}
682682 {:headers {" accept-encoding" " identity, gzip" }}))
683683
684+ (deftest apply-custom-accept-encoding
685+ (testing " no custom encodings to accept"
686+ (is-applied (comp client/wrap-accept-encoding
687+ client/wrap-decompression)
688+ {}
689+ {:headers {" accept-encoding" " gzip, deflate" }
690+ :orig-content-encoding nil }))
691+ (testing " accept some custom encodings, but still include gzip and deflate"
692+ (is-applied (comp client/wrap-accept-encoding
693+ client/wrap-decompression)
694+ {:accept-encoding [:foo :bar ]}
695+ {:headers {" accept-encoding" " foo, bar, gzip, deflate" }
696+ :orig-content-encoding nil }))
697+ (testing " accept some custom encodings, but exclude gzip and deflate"
698+ (is-applied (comp client/wrap-accept-encoding
699+ client/wrap-decompression)
700+ {:accept-encoding [:foo :bar ] :decompress-body false }
701+ {:headers {" accept-encoding" " foo, bar" }
702+ :decompress-body false })))
703+
684704(deftest pass-on-no-accept-encoding
685705 (is-passed client/wrap-accept-encoding
686706 {:uri " /foo" }))
You can’t perform that action at this time.
0 commit comments