Socket
Socket
Sign inDemoInstall

nodecap2

Package Overview
Dependencies
46
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.10 to 0.2.11

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc