Comparing version 0.2.10 to 0.2.11
{ | ||
"name": "nodecap2", | ||
"version": "0.2.10", | ||
"version": "0.2.11", | ||
"description": "ICAP server framework for node.js - create custom HTTP proxy filters for Squid, etc.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -71,3 +71,2 @@ "use strict"; | ||
writeHeaders: function(hasBody) { | ||
var stream = this.stream; | ||
var headerBlock = ''; | ||
@@ -113,10 +112,8 @@ if (!this.icapStatus) { | ||
// icap status/headers | ||
stream.write(this.icapStatus.join(' ')); | ||
stream.write(crlf); | ||
var icapBlock = this.icapStatus.join(' ') + crlf; | ||
_.each(this.icapHeaders, function(value, key) { | ||
stream.write(key + ': ' + value + crlf); | ||
}.bind(this)); | ||
stream.write(crlf); | ||
icapBlock += key + ': ' + value + crlf; | ||
}); | ||
stream.write(headerBlock); | ||
this.stream.write(icapBlock + crlf + headerBlock); | ||
}, | ||
@@ -132,5 +129,3 @@ allowUnchanged: function(icapResponse) { | ||
var code = this._getCode(100); | ||
this.stream.write(code.join(' ')); | ||
this.stream.write(crlf); | ||
this.stream.write(crlf); | ||
this.stream.write(code.join(' ') + crlf + crlf); | ||
}, | ||
@@ -164,5 +159,5 @@ _write: function(data) { | ||
tmp = data instanceof Buffer ? data : new Buffer(data); | ||
this.stream.write(tmp.length.toString(16) + '\r\n'); | ||
this.stream.write(tmp.length.toString(16) + crlf); | ||
this.stream.write(tmp); | ||
this.stream.write('\r\n'); | ||
this.stream.write(crlf); | ||
} else { | ||
@@ -169,0 +164,0 @@ // alert the filter that stream is over |
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
76578
1942