connect-preprocess
Advanced tools
Comparing version 0.1.2 to 0.1.3
12
index.js
@@ -62,16 +62,12 @@ module.exports = function( options ) { | ||
res.end = function( string , encoding ) { | ||
restore(); | ||
encoding = encoding || 'utf-8'; | ||
if (res.data && $preprocessor._accepts( req , res )) { | ||
var body = $preprocessor.engine( res.data ); | ||
string = $preprocessor.engine( res.data ); | ||
if (res.data !== undefined && !res._header) { | ||
res.setHeader( 'Content-Length' , Buffer.byteLength( body , encoding )); | ||
res.setHeader( 'Content-Length' , Buffer.byteLength( string , encoding )); | ||
} | ||
res.data = ''; | ||
restore(); | ||
res.end( body , encoding ); | ||
} | ||
else { | ||
restore(); | ||
next(); | ||
} | ||
res.end( string , encoding ); | ||
}; | ||
@@ -78,0 +74,0 @@ |
{ | ||
"name": "connect-preprocess", | ||
"description": "flexible preprocessor middleware for connect / express.", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/elnarddogg/connect-preprocess", |
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
5904
62