Skip to content

Commit

Permalink
Merge pull request #291 from gabriel-vasile/py
Browse files Browse the repository at this point in the history
Change python main type from application to text
  • Loading branch information
gabriel-vasile committed Jun 26, 2022
2 parents 14adc29 + e4a17e9 commit e4814fb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mimetype_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ var files = map[string]string{
"p7s_pem.p7s": "application/pkcs7-signature",
"p7s_der.p7s": "application/pkcs7-signature",
"pub.pub": "application/vnd.ms-publisher",
"py.py": "application/x-python",
"py.py": "text/x-python",
"qcp.qcp": "audio/qcelp",
"rar.rar": "application/x-rar-compressed",
"rmvb.rmvb": "application/vnd.rn-realmedia-vbr",
Expand Down
2 changes: 1 addition & 1 deletion supported_mimes.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Extension | MIME type | Aliases
**.js** | application/javascript | application/x-javascript, text/javascript
**.lua** | text/x-lua | -
**.pl** | text/x-perl | -
**.py** | application/x-python | -
**.py** | text/x-python | text/x-script.python, application/x-python
**.json** | application/json | -
**.geojson** | application/geo+json | -
**.har** | application/json | -
Expand Down
5 changes: 3 additions & 2 deletions tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ var (
vtt = newMIME("text/vtt", ".vtt", magic.Vtt)
lua = newMIME("text/x-lua", ".lua", magic.Lua)
perl = newMIME("text/x-perl", ".pl", magic.Perl)
python = newMIME("application/x-python", ".py", magic.Python)
tcl = newMIME("text/x-tcl", ".tcl", magic.Tcl).
python = newMIME("text/x-python", ".py", magic.Python).
alias("text/x-script.python", "application/x-python")
tcl = newMIME("text/x-tcl", ".tcl", magic.Tcl).
alias("application/x-tcl")
vCard = newMIME("text/vcard", ".vcf", magic.VCard)
iCalendar = newMIME("text/calendar", ".ics", magic.ICalendar)
Expand Down

0 comments on commit e4814fb

Please sign in to comment.