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

echoecho

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

echoecho - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

lib/echo.js

@@ -19,2 +19,3 @@ "use strict";

var serve = function (req, res) {

@@ -43,2 +44,3 @@ var url = req.url.split('?')[0],

}
};

@@ -45,0 +47,0 @@

32

lib/scheme.js

@@ -22,3 +22,3 @@ "use strict";

var p = parse(req.url),
code = ((req.method === 'GET' || req.method === 'HEAD') ? 200 : 403);
code = ((req.method === 'GET' || req.method === 'HEAD' || req.method === 'OPTIONS') ? 200 : 403);

@@ -59,20 +59,22 @@ res.writeHead(code, headers);

if (req.body) { //Express
gotData = true;
data = qs.stringify(req.body);
}
end();
} else {
req.on('data', function (c) {
gotData = true;
data += c;
});
req.on('data', function (c) {
gotData = true;
data += c;
});
req.on('end', end);
req.on('end', end);
//Seems as if the post doesn't have data
//the end event doesn't fire??
setTimeout(function () {
if (!gotData) {
end();
}
}, 75);
//Seems as if the post doesn't have data
//the end event doesn't fire??
setTimeout(function () {
if (!gotData) {
end();
}
}, 750);
}
};

@@ -79,0 +81,0 @@

@@ -5,3 +5,3 @@ {

"author": "Dav Glass <davglass@gmail.com>",
"version": "0.0.2",
"version": "0.0.3",
"dependencies": {

@@ -8,0 +8,0 @@ },

@@ -33,2 +33,4 @@ EchoEcho

__I recommend using it with Express/Connect to get a properly parsed body for POST/PUT requests__
There are 3 things you need to do inside the Node server providing these tests:

@@ -35,0 +37,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