Skip to content

Commit 2a4f607

Browse files
authored
Ignore application/x-download content type (#105)
The `application/x-download` content type doesn't really carry any meaningful information about the content, and should be ignored in favor of sniffing when checking whether a document might be diffable HTML.
1 parent 9f13923 commit 2a4f607

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

docs/source/release-history.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ In Development
77

88
- Ignore invalid `Content-Type` headers when diffing HTML. (:issue:`75`)
99

10+
- Ignore `application/x-download` Content-Type when diffing HTML.
11+
1012

1113
Version 0.1.2 (2021-04-01)
1214
-----------------------------

web_monitoring_diff/content_type.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
# Matches Content Types that *could* be acceptable for diffing as HTML
3939
UNKNOWN_CONTENT_TYPE_PATTERN = re.compile(r'^(%s)$' % '|'.join((
4040
r'application/octet-stream',
41+
r'application/x-download',
4142
r'text/.+'
4243
)))
4344

0 commit comments

Comments
 (0)