Skip to content

Commit

Permalink
HTML documents can be retrieved as 'fetch' as well (fix #405)
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit74 committed Oct 8, 2024
1 parent 6534213 commit 5d452e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/warc2zim/content_rewriting/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def get_rewrite_mode(self, record, mimetype):
def get_resourcetype_rewrite_mode(self, record, resourcetype, mimetype):
"""Get current record rewrite mode based on WARC-Resource-Type and mimetype"""

if resourcetype in ["document", "xhr"] and mimetype == "text/html":
if resourcetype in ["document", "xhr", "fetch"] and mimetype == "text/html":
# TODO : Handle header "Accept" == "application/json"
if getattr(record, "method", "GET") == "GET":
return "html"
Expand Down

0 comments on commit 5d452e1

Please sign in to comment.