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

messy

Package Overview
Dependencies
Maintainers
3
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

messy - npm Package Compare versions

Comparing version 6.7.1 to 6.8.0

2

lib/Message.js

@@ -446,3 +446,3 @@ /*global unescape, btoa, atob, JSON*/

result += '\r\n';
if (this.body && typeof this.body === 'object' && isNonBufferNonRegExpObject(this.body) && /^application\/json\b|\+json/i.test(this.headers.get('Content-Type'))) {
if (this.body && typeof this.body === 'object' && isNonBufferNonRegExpObject(this.body)) {
result += JSON.stringify(this.body);

@@ -449,0 +449,0 @@ } else {

{
"name": "messy",
"version": "6.7.1",
"version": "6.8.0",
"description": "Object model for HTTP and RFC822 messages",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -888,2 +888,17 @@ /*global describe, it*/

});
it('should support passing a JSON body as an object despite a non-JSON Content-Type', function () {
expect(new Message({
headers: {
'Content-Type': 'application/octet-stream'
},
body: {
foo: 123
}
}).toString(), 'to equal',
'Content-Type: application/octet-stream\r\n' +
'\r\n' +
'{"foo":123}'
);
});
});
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