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

jsonrpcserver

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsonrpcserver - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "jsonrpcserver",
"version": "1.0.0",
"version": "1.0.1",
"description": "JSON-RPC Server (http://www.jsonrpc.org/specification) with endpoints implementation",

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

@@ -79,3 +79,3 @@ 'use strict';

catch(e) {
this.logger.warn('JSON-RPC entity: request parse error:', this.raw.join(''));
this.logger.warn('JSON-RPC entity: request parse error:', this.raw.join('') || '[empty request data]');
}

@@ -159,3 +159,3 @@

//Result
else if(data) {
else {
response = {

@@ -168,5 +168,2 @@ jsonrpc: "2.0",

//Notifications
else httpCode = 204;
//Send response

@@ -173,0 +170,0 @@ this.getResponse().writeHead(httpCode, headers);

@@ -17,4 +17,5 @@ /**

"E_NOTIFICATION": {httpCode: 204, response: null, name: "E_NOTIFICATION"},
"E_DISALLOWED_REQUEST_METHOD": {httpCode: 405, response: null, name: "E_DISALLOWED_REQUEST_METHOD"},
"E_TIMEOUT": {httpCode: 504, response: null, name: "E_TIMEOUT"}
};

@@ -192,6 +192,6 @@ 'use strict';

//if notification
if(request.content && !request.content.hasOwnProperty('id')) isNotification = true;
if(request.content && !request.content.hasOwnProperty('id')) isNotification = RpcErrors.E_NOTIFICATION;
if(!error) this.callMethod(uuid, request.url.path, request.content.method, request.content.params);
if(error || isNotification) this.processResponse(uuid, error);
if(error || isNotification) this.processResponse(uuid, error || isNotification);
};

@@ -198,0 +198,0 @@

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