File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,16 @@ import (
1313var (
1414 // MIMEEncodings maps Content-Type values to encoding types for response parsing.
1515 MIMEEncodings = map [string ]cmds.EncodingType {
16- "application/json" : cmds .JSON ,
17- "application/octet-stream" : cmds .OctetStream ,
18- "application/x-tar" : cmds .OctetStream ,
19- "application/xml" : cmds .XML ,
20- "text/plain" : cmds .Text ,
16+ "application/gzip" : cmds .OctetStream ,
17+ "application/json" : cmds .JSON ,
18+ "application/octet-stream" : cmds .OctetStream ,
19+ "application/vnd.ipfs.ipns-record" : cmds .OctetStream ,
20+ "application/vnd.ipld.car" : cmds .OctetStream ,
21+ "application/vnd.ipld.raw" : cmds .OctetStream ,
22+ "application/x-tar" : cmds .OctetStream ,
23+ "application/xml" : cmds .XML ,
24+ "application/zip" : cmds .OctetStream ,
25+ "text/plain" : cmds .Text ,
2126 }
2227)
2328
Original file line number Diff line number Diff line change @@ -139,6 +139,12 @@ func TestMIMEEncodingsMapping(t *testing.T) {
139139 {"application/xml" , cmds .XML },
140140 {"text/plain" , cmds .Text },
141141 {"application/octet-stream" , cmds .OctetStream },
142+ {"application/gzip" , cmds .OctetStream },
143+ {"application/x-tar" , cmds .OctetStream },
144+ {"application/zip" , cmds .OctetStream },
145+ {"application/vnd.ipld.car" , cmds .OctetStream },
146+ {"application/vnd.ipld.raw" , cmds .OctetStream },
147+ {"application/vnd.ipfs.ipns-record" , cmds .OctetStream },
142148 }
143149
144150 for _ , tt := range tests {
You can’t perform that action at this time.
0 commit comments