Comparing version 5.0.9 to 5.1.0-beta
@@ -21,3 +21,3 @@ 'use strict'; | ||
this.mime_map = { | ||
this.mimeTable = { | ||
'css' : 'text/css', | ||
@@ -59,7 +59,17 @@ 'der' : 'application/x-x509-ca-cert', | ||
'zip' : 'application/zip', | ||
'pdf' : 'application/pdf' | ||
}; | ||
'pdf' : 'application/pdf', | ||
this.default_mime = 'application/octet-stream'; | ||
'docx': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': '.docx', | ||
'doc': 'application/vnd.ms-word', | ||
'pptx': 'application/vnd.openxmlformats-officedocument.presentationml.presentation', | ||
'xlsx': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', | ||
'odp': 'application/vnd.oasis.opendocument.presentation', | ||
'odt': 'application/vnd.oasis.opendocument.text', | ||
'ods': 'application/vnd.oasis.opendocument.spreadsheet', | ||
'odg': 'application/vnd.oasis.opendocument.graphics' | ||
} | ||
this.default_mime = 'application/octet-stream' | ||
this.extName = function (filename = '') { | ||
@@ -73,3 +83,3 @@ if (filename.length < 2) return ''; | ||
return name_split[name_split.length - 1]; | ||
}; | ||
} | ||
@@ -79,13 +89,13 @@ this.mimeType = function (filename) { | ||
extname = extname.toLowerCase(); | ||
if (extname !== '' && this.mime_map[extname] !== undefined) { | ||
return this.mime_map[extname]; | ||
if (extname !== '' && this.mimeTable[extname] !== undefined) { | ||
return this.mimeTable[extname]; | ||
} | ||
return this.default_mime; | ||
}; | ||
} | ||
}; | ||
} | ||
bodymaker.prototype.fmtName = function (name) { | ||
return name.replace(/"/g, '%22'); | ||
}; | ||
} | ||
@@ -92,0 +102,0 @@ bodymaker.prototype.fmtFilename = function (name) { |
{ | ||
"name": "gohttp", | ||
"version": "5.0.9", | ||
"version": "5.1.0-beta", | ||
"description": "http & https client for HTTP/1.1 and HTTP/2", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
111487
2086
2