Socket
Socket
Sign inDemoInstall

q-io

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

q-io - npm Package Compare versions

Comparing version 1.10.5 to 1.10.6

4

CHANGES.md
<!-- vim:ts=4:sts=4:sw=4:et:tw=60 -->
## 1.10.6
- Restores support for host negotiation terms.
## 1.10.5

@@ -4,0 +8,0 @@

24

http-apps/negotiate.js

@@ -79,5 +79,10 @@

exports.Host = function (appForHost, notAcceptable) {
var patterns = Object.keys(appForHost).map(function (pattern) {
var table = Object.keys(appForHost).map(function (pattern) {
var parts = pattern.split(":");
return [parts[0] || "*", parts[1] || "*", appForHost[pattern]];
return [
pattern,
parts[0] || "*",
parts[1] || "*",
appForHost[pattern]
];
});

@@ -89,7 +94,8 @@ if (!notAcceptable) {

// find first matching host for app
for (var index = 0; index < patterns.length; index++) {
var pattern = patterns[index]; // [hostname, port, app]
var hostname = pattern[0];
var port = pattern[1];
var app = pattern[2];
for (var index = 0; index < table.length; index++) {
var row = table[index]; // [hostname, port, app]
var pattern = row[0];
var hostname = row[1];
var port = row[2];
var app = row[3];
if (

@@ -99,2 +105,6 @@ (hostname === "*" || hostname === request.hostname) &&

) {
if (!request.terms) {
request.terms = {};
}
request.terms.host = pattern;
return app(request);

@@ -101,0 +111,0 @@ }

{
"name": "q-io",
"version": "1.10.5",
"version": "1.10.6",
"description": "IO using Q promises",

@@ -5,0 +5,0 @@ "homepage": "http://github.com/kriskowal/q-io/",

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