Skip to content

Commit 387199d

Browse files
authored
PDF download timeouts changes (boostorg#1972) (boostorg#1973)
1 parent 122d173 commit 387199d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ class ContentNotFoundException(Exception):
235235
class BaseStaticContentTemplateView(TemplateView):
236236
template_name = "adoc_content.html"
237237
allowed_db_save_types = {"text/asciidoc"}
238+
html_content_types = {"text/html", "text/html; charset=utf-8"}
238239

239240
def get(self, request, *args, **kwargs):
240241
"""Return static content that originates in S3.
@@ -573,7 +574,8 @@ def get_content(self, content_path):
573574
logger.info(f"get_content_from_s3_view_no_valid_object {content_path=}")
574575
raise ContentNotFoundException("Content not found")
575576

576-
result["redirect"] = get_meta_redirect_from_html(result["content"])
577+
if result["content_type"] in self.html_content_types:
578+
result["redirect"] = get_meta_redirect_from_html(result["content"])
577579

578580
return result
579581

0 commit comments

Comments
 (0)