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

connect-rest

Package Overview
Dependencies
Maintainers
1
Versions
190
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-rest - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

13

lib/connect-rest.js

@@ -68,3 +68,3 @@ /*

action(request, content, function(err, result, resOptions){
callback(err, { contentType: options.contentType || 'application/json', result : result, resOptions: resOptions || {} } );
callback(err, { contentType: options.contentType, result : result, resOptions: resOptions || {} } );
});

@@ -74,3 +74,3 @@ } else {

var err;
callback( err, { contentType: options.contentType || 'application/json', result : result, resOptions: {} } );
callback( err, { contentType: options.contentType, result : result, resOptions: {} } );
}

@@ -125,2 +125,4 @@ }, _

} else {
if( !result.contentType )
result.contentType = 'application/json';
var headers = result.resOptions.headers || { };

@@ -179,2 +181,9 @@ if( !headers['Content-Type'] )

if( isReadableStream( result.result ) ){
result.result.on('open', function () {
var headers = result.resOptions.headers || { };
if( !headers['Content-Type'] && result.contentType ){
headers['Content-Type'] = result.contentType;
}
res.writeHead( result.resOptions.statusCode || 200, headers );
});
result.result.on('error',function( error ){

@@ -181,0 +190,0 @@ returnResult( error, null, res );

4

package.json
{
"name": "connect-rest",
"version": "1.2.1",
"version": "1.2.2",
"description": "Exceptionally featureful RESTful web services middleware for Connect.",

@@ -57,3 +57,3 @@ "keywords": [

},
"_id": "connect-rest@1.2.1"
"_id": "connect-rest@1.2.2"
}

Sorry, the diff of this file is not supported yet

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