New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 0.0.24 to 0.0.25

8

lib/connect-rest.js

@@ -6,3 +6,3 @@ /*

*/
var VERSION = '0.0.24';
var VERSION = '0.0.25';

@@ -135,4 +135,4 @@ var connect = require('connect');

logger.debug( 'Results:', results );
var result = _.find(results, function(returnValue){ return returnValue && returnValue.result; }) || {};
var headers = result.resOptions ? (result.resOptions.headers || { }) : { };
var result = _.find(results, function(returnValue){ return returnValue && returnValue.result; }) || { result: '', resOptions:{ statusCode: 204 } };
var headers = result.resOptions.headers || { };
if( !headers['Content-Type'] )

@@ -142,3 +142,3 @@ headers['Content-Type'] = result.contentType || 'application/json';

res.end( result && result.result ? ((result.contentType == 'application/json') ? JSON.stringify( result.result ) : result.result) : '' );
res.end( (result.contentType == 'application/json') ? JSON.stringify( result.result ) : result.result );
}

@@ -145,0 +145,0 @@ }

{
"name": "connect-rest",
"version": "0.0.24",
"version": "0.0.25",
"description": "RESTful web services middleware for Connect.",

@@ -49,4 +49,4 @@ "keywords": [

"readme": "README.md",
"_id": "connect-rest@0.0.24",
"_from": "connect-rest@>=0.0.24"
"_id": "connect-rest@0.0.25",
"_from": "connect-rest@>=0.0.25"
}

@@ -394,3 +394,3 @@ [connect-rest](https://github.com/imrefazekas/connect-rest) is a middleware for [connect](http://www.senchalabs.org/connect/) for building REST APIs providing service discovery and path-based parameter mapping and "reflective" publishing and node domains as well.

- 0.0.23-24: small fix for content type management
- 0.0.23-25: small fix for content type management
- 0.0.22: response header customization added

@@ -397,0 +397,0 @@ - 0.0.21:

@@ -39,3 +39,3 @@ function buildUpRestAPI( rest, _ ){

console.log( 'Received::' + JSON.stringify( request ) + ' ' + JSON.stringify(content) );
return callback(null, 'ok');
return callback(null, '', {statusCode:201} );
}, { contentType:'text/plain', validator: function(req, res){ return true; } } );

@@ -42,0 +42,0 @@ }

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