aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2018-11-10 10:57:54 -0800
committerMark Sapiro <mark@msapiro.net>2018-11-10 10:57:54 -0800
commit7e459e691de1e0e97bd99ff550a7a7904a54f61c (patch)
tree29109576a53c969064bdb937b84dcbbc11901aa0 /Mailman/Handlers
parent8ec9d40c8ab6bfd814a7026bab21997e05b5e8e0 (diff)
downloadmailman2-7e459e691de1e0e97bd99ff550a7a7904a54f61c.tar.gz
mailman2-7e459e691de1e0e97bd99ff550a7a7904a54f61c.tar.xz
mailman2-7e459e691de1e0e97bd99ff550a7a7904a54f61c.zip
Use .bin extension for scrubbed application/octet-stream files.
Diffstat (limited to '')
-rw-r--r--Mailman/Handlers/Scrubber.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Mailman/Handlers/Scrubber.py b/Mailman/Handlers/Scrubber.py
index 429312be..97e443b7 100644
--- a/Mailman/Handlers/Scrubber.py
+++ b/Mailman/Handlers/Scrubber.py
@@ -87,6 +87,9 @@ def guess_extension(ctype, ext):
all = guess_all_extensions(ctype, strict=False)
if ext in all:
return ext
+ if ctype.lower == 'application/octet-stream':
+ # For this type, all[0] is '.obj'. '.bin' is better.
+ return '.bin'
return all and all[0]