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

restify

Package Overview
Dependencies
Maintainers
0
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restify - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

33

lib/restify.js

@@ -18,3 +18,2 @@ // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.

// Just force this to extend http.ServerResponse

@@ -25,2 +24,19 @@ require('./http-extra');

var _eHandlerInstalled = false;
function _installExceptionHandler() {
if (_eHandlerInstalled) return true;
process.on('uncaughtException', function(e) {
log.warn('uncaughtException: ' + (e.stack ? e.stack : e));
if (_response) {
_response.writeHead(HttpCodes.InternalError);
_response.end();
_response = null;
}
});
_eHandlerInstalled = true;
}
function _sanitizePath(path) {

@@ -403,2 +419,3 @@ assert.ok(path);

var installedExceptionHandler = false;
if (options) {

@@ -413,2 +430,3 @@ if (options.apiVersion) {

process.on('uncaughtException', options.exceptionHandler);
installedExceptionHandler = true;
}

@@ -442,13 +460,4 @@ if (options.maxRequestSize) {

}
if (!options &&
!options.exceptionHandler) {
process.on('uncaughtException', function(e) {
log.warn('uncaughtException: ' + (e.stack ? e.stack : e));
if (_response) {
_response.writeHead(HttpCodes.InternalError);
_response.end();
_response = null;
}
});
if (!installedExceptionHandler) {
_installExceptionHandler();
}

@@ -455,0 +464,0 @@

{
"name": "restify",
"description": "REST framework specifically meant for web service APIs",
"version": "0.1.8",
"version": "0.1.9",
"repository": {

@@ -6,0 +6,0 @@ "type": "git",

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