commit: 1b2f9d4a6db69e75bc14ff3a756ee7ba9126b1a4
parent 79d69ce72a4a922d1be8f3aae36d5fff3089fd1c
Author: feld <feld@feld.me>
Date: Wed, 14 Feb 2024 18:56:54 +0000
Merge branch 'proxy-headers' into 'develop'
MediaProxy RFC compliance
See merge request pleroma/pleroma!4062
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/changelog.d/content-length.fix b/changelog.d/content-length.fix
@@ -0,0 +1 @@
+MediaProxy was setting the content-length header which is not permitted by RFC9112§6.2 when we are chunking the reply as it conflicts with the existence of the transfer-encoding header.
diff --git a/lib/pleroma/reverse_proxy.ex b/lib/pleroma/reverse_proxy.ex
@@ -8,7 +8,7 @@ defmodule Pleroma.ReverseProxy do
~w(if-unmodified-since if-none-match) ++ @range_headers
@resp_cache_headers ~w(etag date last-modified)
@keep_resp_headers @resp_cache_headers ++
- ~w(content-length content-type content-disposition content-encoding) ++
+ ~w(content-type content-disposition content-encoding) ++
~w(content-range accept-ranges vary)
@default_cache_control_header "public, max-age=1209600"
@valid_resp_codes [200, 206, 304]