Skip to content

Commit

Permalink
Set mime type for html pages (#545)
Browse files Browse the repository at this point in the history
Fixes #544 

As long as the response has a content-type header, we should use it to
set MIME type for the page.
  • Loading branch information
tw4l authored Apr 15, 2024
1 parent f6edec0 commit efebc33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crawler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1754,7 +1754,7 @@ self.__bx_behaviors.selectMainBehavior();

isHTMLPage = this.isHTMLContentType(contentType);

if (!isHTMLPage) {
if (contentType) {
data.mime = contentType.split(";")[0];
}
} catch (e) {
Expand Down

0 comments on commit efebc33

Please sign in to comment.