Comparing version 0.0.0 to 0.0.1
{ | ||
"name": "web", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "A small and fast web/http library for nodejs. (replaces the built-in http module)", | ||
@@ -5,0 +5,0 @@ "main": "web.js", |
13
web.js
@@ -81,11 +81,11 @@ var HTTPParser = process.binding("http_parser").HTTPParser; | ||
var isStreaming = body && typeof body === "object" && typeof body.pipe === "function"; | ||
if (body && !isStreaming) head += body; | ||
client.write(head); | ||
if (!isStreaming) { | ||
return done() | ||
} | ||
body.pipe(client); | ||
@@ -109,9 +109,8 @@ body.on("end", done); | ||
}); | ||
client.on("end", function () { | ||
parser.finish(); | ||
}); | ||
function done() { | ||
console.log(req); | ||
if (req.shouldKeepAlive) { | ||
@@ -118,0 +117,0 @@ parser.reinitialize(HTTPParser.REQUEST); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
11540
5
0
71
227