Skip to content

Commit

Permalink
Merge pull request #5 from simonwoerpel/types/xml
Browse files Browse the repository at this point in the history
Change default xml type to application/xml according to RFC 7303
  • Loading branch information
pudo authored Jul 19, 2023
2 parents ac57714 + cfbc051 commit bbe7503
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pantomime/mappings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Dict
from pantomime.types import DEFAULT, PLAIN, DIRECTORY
from pantomime.types import EXCEL, PDF, CSV, RTF, PSD, WORD
from pantomime.types import EXCEL, PDF, CSV, RTF, PSD, WORD, XML
from pantomime.types import RAR, ZIP, GZIP, TIFF, JPEG

REPLACE: Dict[str, str] = {
Expand All @@ -18,6 +18,8 @@
"*/*": DEFAULT,
# CSV
"application/csv": CSV,
# XML
"text/xml": XML,
# Plain
"plain/text": PLAIN,
"text/text": PLAIN,
Expand Down
2 changes: 1 addition & 1 deletion pantomime/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
DOCX = "application/vnd.openxmlformats-officedocument.wordprocessing"
CSV = "text/csv"
RTF = "text/rtf"
XML = "text/xml"
XML = "application/xml"
PSD = "image/vnd.adobe.photoshop"
RAR = "application/rar"
ZIP = "application/zip"
Expand Down

0 comments on commit bbe7503

Please sign in to comment.