Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gohttp

Package Overview
Dependencies
Maintainers
0
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gohttp - npm Package Compare versions

Comparing version 5.0.9 to 5.1.0-beta

30

bodymaker.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc