You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by an...@apache.org on 2015/05/08 13:36:54 UTC
[29/52] [partial] incubator-ignite git commit: # ignite-843 WIP.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/qs/test/parse.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/qs/test/parse.js b/modules/webconfig/nodejs/node_modules/express/node_modules/qs/test/parse.js
new file mode 100755
index 0000000..f06788a
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/qs/test/parse.js
@@ -0,0 +1,413 @@
+/* eslint no-extend-native:0 */
+// Load modules
+
+var Code = require('code');
+var Lab = require('lab');
+var Qs = require('../');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var expect = Code.expect;
+var describe = lab.experiment;
+var it = lab.test;
+
+
+describe('parse()', function () {
+
+ it('parses a simple string', function (done) {
+
+ expect(Qs.parse('0=foo')).to.deep.equal({ '0': 'foo' });
+ expect(Qs.parse('foo=c++')).to.deep.equal({ foo: 'c ' });
+ expect(Qs.parse('a[>=]=23')).to.deep.equal({ a: { '>=': '23' } });
+ expect(Qs.parse('a[<=>]==23')).to.deep.equal({ a: { '<=>': '=23' } });
+ expect(Qs.parse('a[==]=23')).to.deep.equal({ a: { '==': '23' } });
+ expect(Qs.parse('foo')).to.deep.equal({ foo: '' });
+ expect(Qs.parse('foo=bar')).to.deep.equal({ foo: 'bar' });
+ expect(Qs.parse(' foo = bar = baz ')).to.deep.equal({ ' foo ': ' bar = baz ' });
+ expect(Qs.parse('foo=bar=baz')).to.deep.equal({ foo: 'bar=baz' });
+ expect(Qs.parse('foo=bar&bar=baz')).to.deep.equal({ foo: 'bar', bar: 'baz' });
+ expect(Qs.parse('foo=bar&baz')).to.deep.equal({ foo: 'bar', baz: '' });
+ expect(Qs.parse('cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World')).to.deep.equal({
+ cht: 'p3',
+ chd: 't:60,40',
+ chs: '250x100',
+ chl: 'Hello|World'
+ });
+ done();
+ });
+
+ it('parses a single nested string', function (done) {
+
+ expect(Qs.parse('a[b]=c')).to.deep.equal({ a: { b: 'c' } });
+ done();
+ });
+
+ it('parses a double nested string', function (done) {
+
+ expect(Qs.parse('a[b][c]=d')).to.deep.equal({ a: { b: { c: 'd' } } });
+ done();
+ });
+
+ it('defaults to a depth of 5', function (done) {
+
+ expect(Qs.parse('a[b][c][d][e][f][g][h]=i')).to.deep.equal({ a: { b: { c: { d: { e: { f: { '[g][h]': 'i' } } } } } } });
+ done();
+ });
+
+ it('only parses one level when depth = 1', function (done) {
+
+ expect(Qs.parse('a[b][c]=d', { depth: 1 })).to.deep.equal({ a: { b: { '[c]': 'd' } } });
+ expect(Qs.parse('a[b][c][d]=e', { depth: 1 })).to.deep.equal({ a: { b: { '[c][d]': 'e' } } });
+ done();
+ });
+
+ it('parses a simple array', function (done) {
+
+ expect(Qs.parse('a=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
+ done();
+ });
+
+ it('parses an explicit array', function (done) {
+
+ expect(Qs.parse('a[]=b')).to.deep.equal({ a: ['b'] });
+ expect(Qs.parse('a[]=b&a[]=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a[]=b&a[]=c&a[]=d')).to.deep.equal({ a: ['b', 'c', 'd'] });
+ done();
+ });
+
+ it('parses a mix of simple and explicit arrays', function (done) {
+
+ expect(Qs.parse('a=b&a[]=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a[]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a[0]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a=b&a[0]=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a[1]=b&a=c')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a=b&a[1]=c')).to.deep.equal({ a: ['b', 'c'] });
+ done();
+ });
+
+ it('parses a nested array', function (done) {
+
+ expect(Qs.parse('a[b][]=c&a[b][]=d')).to.deep.equal({ a: { b: ['c', 'd'] } });
+ expect(Qs.parse('a[>=]=25')).to.deep.equal({ a: { '>=': '25' } });
+ done();
+ });
+
+ it('allows to specify array indices', function (done) {
+
+ expect(Qs.parse('a[1]=c&a[0]=b&a[2]=d')).to.deep.equal({ a: ['b', 'c', 'd'] });
+ expect(Qs.parse('a[1]=c&a[0]=b')).to.deep.equal({ a: ['b', 'c'] });
+ expect(Qs.parse('a[1]=c')).to.deep.equal({ a: ['c'] });
+ done();
+ });
+
+ it('limits specific array indices to 20', function (done) {
+
+ expect(Qs.parse('a[20]=a')).to.deep.equal({ a: ['a'] });
+ expect(Qs.parse('a[21]=a')).to.deep.equal({ a: { '21': 'a' } });
+ done();
+ });
+
+ it('supports keys that begin with a number', function (done) {
+
+ expect(Qs.parse('a[12b]=c')).to.deep.equal({ a: { '12b': 'c' } });
+ done();
+ });
+
+ it('supports encoded = signs', function (done) {
+
+ expect(Qs.parse('he%3Dllo=th%3Dere')).to.deep.equal({ 'he=llo': 'th=ere' });
+ done();
+ });
+
+ it('is ok with url encoded strings', function (done) {
+
+ expect(Qs.parse('a[b%20c]=d')).to.deep.equal({ a: { 'b c': 'd' } });
+ expect(Qs.parse('a[b]=c%20d')).to.deep.equal({ a: { b: 'c d' } });
+ done();
+ });
+
+ it('allows brackets in the value', function (done) {
+
+ expect(Qs.parse('pets=["tobi"]')).to.deep.equal({ pets: '["tobi"]' });
+ expect(Qs.parse('operators=[">=", "<="]')).to.deep.equal({ operators: '[">=", "<="]' });
+ done();
+ });
+
+ it('allows empty values', function (done) {
+
+ expect(Qs.parse('')).to.deep.equal({});
+ expect(Qs.parse(null)).to.deep.equal({});
+ expect(Qs.parse(undefined)).to.deep.equal({});
+ done();
+ });
+
+ it('transforms arrays to objects', function (done) {
+
+ expect(Qs.parse('foo[0]=bar&foo[bad]=baz')).to.deep.equal({ foo: { '0': 'bar', bad: 'baz' } });
+ expect(Qs.parse('foo[bad]=baz&foo[0]=bar')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } });
+ expect(Qs.parse('foo[bad]=baz&foo[]=bar')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar' } });
+ expect(Qs.parse('foo[]=bar&foo[bad]=baz')).to.deep.equal({ foo: { '0': 'bar', bad: 'baz' } });
+ expect(Qs.parse('foo[bad]=baz&foo[]=bar&foo[]=foo')).to.deep.equal({ foo: { bad: 'baz', '0': 'bar', '1': 'foo' } });
+ expect(Qs.parse('foo[0][a]=a&foo[0][b]=b&foo[1][a]=aa&foo[1][b]=bb')).to.deep.equal({foo: [ {a: 'a', b: 'b'}, {a: 'aa', b: 'bb'} ]});
+ done();
+ });
+
+ it('can add keys to objects', function (done) {
+
+ expect(Qs.parse('a[b]=c&a=d')).to.deep.equal({ a: { b: 'c', d: true } });
+ done();
+ });
+
+ it('correctly prunes undefined values when converting an array to an object', function (done) {
+
+ expect(Qs.parse('a[2]=b&a[99999999]=c')).to.deep.equal({ a: { '2': 'b', '99999999': 'c' } });
+ done();
+ });
+
+ it('supports malformed uri characters', function (done) {
+
+ expect(Qs.parse('{%:%}')).to.deep.equal({ '{%:%}': '' });
+ expect(Qs.parse('foo=%:%}')).to.deep.equal({ foo: '%:%}' });
+ done();
+ });
+
+ it('doesn\'t produce empty keys', function (done) {
+
+ expect(Qs.parse('_r=1&')).to.deep.equal({ '_r': '1' });
+ done();
+ });
+
+ it('cannot override prototypes', function (done) {
+
+ var obj = Qs.parse('hasOwnProperty=bad&toString=bad&bad[toString]=bad&constructor=bad');
+ expect(typeof obj.toString).to.equal('function');
+ expect(typeof obj.bad.toString).to.equal('function');
+ expect(typeof obj.constructor).to.equal('function');
+ done();
+ });
+
+ it('cannot access Object prototype', function (done) {
+
+ Qs.parse('constructor[prototype][bad]=bad');
+ Qs.parse('bad[constructor][prototype][bad]=bad');
+ expect(typeof Object.prototype.bad).to.equal('undefined');
+ done();
+ });
+
+ it('parses arrays of objects', function (done) {
+
+ expect(Qs.parse('a[][b]=c')).to.deep.equal({ a: [{ b: 'c' }] });
+ expect(Qs.parse('a[0][b]=c')).to.deep.equal({ a: [{ b: 'c' }] });
+ done();
+ });
+
+ it('allows for empty strings in arrays', function (done) {
+
+ expect(Qs.parse('a[]=b&a[]=&a[]=c')).to.deep.equal({ a: ['b', '', 'c'] });
+ expect(Qs.parse('a[0]=b&a[1]=&a[2]=c&a[19]=')).to.deep.equal({ a: ['b', '', 'c', ''] });
+ expect(Qs.parse('a[]=&a[]=b&a[]=c')).to.deep.equal({ a: ['', 'b', 'c'] });
+ done();
+ });
+
+ it('compacts sparse arrays', function (done) {
+
+ expect(Qs.parse('a[10]=1&a[2]=2')).to.deep.equal({ a: ['2', '1'] });
+ done();
+ });
+
+ it('parses semi-parsed strings', function (done) {
+
+ expect(Qs.parse({ 'a[b]': 'c' })).to.deep.equal({ a: { b: 'c' } });
+ expect(Qs.parse({ 'a[b]': 'c', 'a[d]': 'e' })).to.deep.equal({ a: { b: 'c', d: 'e' } });
+ done();
+ });
+
+ it('parses buffers correctly', function (done) {
+
+ var b = new Buffer('test');
+ expect(Qs.parse({ a: b })).to.deep.equal({ a: b });
+ done();
+ });
+
+ it('continues parsing when no parent is found', function (done) {
+
+ expect(Qs.parse('[]&a=b')).to.deep.equal({ '0': '', a: 'b' });
+ expect(Qs.parse('[foo]=bar')).to.deep.equal({ foo: 'bar' });
+ done();
+ });
+
+ it('does not error when parsing a very long array', function (done) {
+
+ var str = 'a[]=a';
+ while (Buffer.byteLength(str) < 128 * 1024) {
+ str += '&' + str;
+ }
+
+ expect(function () {
+
+ Qs.parse(str);
+ }).to.not.throw();
+
+ done();
+ });
+
+ it('should not throw when a native prototype has an enumerable property', { parallel: false }, function (done) {
+
+ Object.prototype.crash = '';
+ Array.prototype.crash = '';
+ expect(Qs.parse.bind(null, 'a=b')).to.not.throw();
+ expect(Qs.parse('a=b')).to.deep.equal({ a: 'b' });
+ expect(Qs.parse.bind(null, 'a[][b]=c')).to.not.throw();
+ expect(Qs.parse('a[][b]=c')).to.deep.equal({ a: [{ b: 'c' }] });
+ delete Object.prototype.crash;
+ delete Array.prototype.crash;
+ done();
+ });
+
+ it('parses a string with an alternative string delimiter', function (done) {
+
+ expect(Qs.parse('a=b;c=d', { delimiter: ';' })).to.deep.equal({ a: 'b', c: 'd' });
+ done();
+ });
+
+ it('parses a string with an alternative RegExp delimiter', function (done) {
+
+ expect(Qs.parse('a=b; c=d', { delimiter: /[;,] */ })).to.deep.equal({ a: 'b', c: 'd' });
+ done();
+ });
+
+ it('does not use non-splittable objects as delimiters', function (done) {
+
+ expect(Qs.parse('a=b&c=d', { delimiter: true })).to.deep.equal({ a: 'b', c: 'd' });
+ done();
+ });
+
+ it('allows overriding parameter limit', function (done) {
+
+ expect(Qs.parse('a=b&c=d', { parameterLimit: 1 })).to.deep.equal({ a: 'b' });
+ done();
+ });
+
+ it('allows setting the parameter limit to Infinity', function (done) {
+
+ expect(Qs.parse('a=b&c=d', { parameterLimit: Infinity })).to.deep.equal({ a: 'b', c: 'd' });
+ done();
+ });
+
+ it('allows overriding array limit', function (done) {
+
+ expect(Qs.parse('a[0]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '0': 'b' } });
+ expect(Qs.parse('a[-1]=b', { arrayLimit: -1 })).to.deep.equal({ a: { '-1': 'b' } });
+ expect(Qs.parse('a[0]=b&a[1]=c', { arrayLimit: 0 })).to.deep.equal({ a: { '0': 'b', '1': 'c' } });
+ done();
+ });
+
+ it('parses an object', function (done) {
+
+ var input = {
+ 'user[name]': {'pop[bob]': 3},
+ 'user[email]': null
+ };
+
+ var expected = {
+ 'user': {
+ 'name': {'pop[bob]': 3},
+ 'email': null
+ }
+ };
+
+ var result = Qs.parse(input);
+
+ expect(result).to.deep.equal(expected);
+ done();
+ });
+
+ it('parses an object and not child values', function (done) {
+
+ var input = {
+ 'user[name]': {'pop[bob]': { 'test': 3 }},
+ 'user[email]': null
+ };
+
+ var expected = {
+ 'user': {
+ 'name': {'pop[bob]': { 'test': 3 }},
+ 'email': null
+ }
+ };
+
+ var result = Qs.parse(input);
+
+ expect(result).to.deep.equal(expected);
+ done();
+ });
+
+ it('does not blow up when Buffer global is missing', function (done) {
+
+ var tempBuffer = global.Buffer;
+ delete global.Buffer;
+ var result = Qs.parse('a=b&c=d');
+ global.Buffer = tempBuffer;
+ expect(result).to.deep.equal({ a: 'b', c: 'd' });
+ done();
+ });
+
+ it('does not crash when using invalid dot notation', function (done) {
+
+ expect(Qs.parse('roomInfoList[0].childrenAges[0]=15&roomInfoList[0].numberOfAdults=2')).to.deep.equal({ roomInfoList: [['15', '2']] });
+ done();
+ });
+
+ it('does not crash when parsing circular references', function (done) {
+
+ var a = {};
+ a.b = a;
+
+ var parsed;
+
+ expect(function () {
+
+ parsed = Qs.parse({ 'foo[bar]': 'baz', 'foo[baz]': a });
+ }).to.not.throw();
+
+ expect(parsed).to.contain('foo');
+ expect(parsed.foo).to.contain('bar', 'baz');
+ expect(parsed.foo.bar).to.equal('baz');
+ expect(parsed.foo.baz).to.deep.equal(a);
+ done();
+ });
+
+ it('parses plain objects correctly', function (done) {
+
+ var a = Object.create(null);
+ a.b = 'c';
+
+ expect(Qs.parse(a)).to.deep.equal({ b: 'c' });
+ var result = Qs.parse({ a: a });
+ expect(result).to.contain('a');
+ expect(result.a).to.deep.equal(a);
+ done();
+ });
+
+ it('parses dates correctly', function (done) {
+
+ var now = new Date();
+ expect(Qs.parse({ a: now })).to.deep.equal({ a: now });
+ done();
+ });
+
+ it('parses regular expressions correctly', function (done) {
+
+ var re = /^test$/;
+ expect(Qs.parse({ a: re })).to.deep.equal({ a: re });
+ done();
+ });
+});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/qs/test/stringify.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/qs/test/stringify.js b/modules/webconfig/nodejs/node_modules/express/node_modules/qs/test/stringify.js
new file mode 100755
index 0000000..7bdec32
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/qs/test/stringify.js
@@ -0,0 +1,209 @@
+/* eslint no-extend-native:0 */
+// Load modules
+
+var Code = require('code');
+var Lab = require('lab');
+var Qs = require('../');
+
+
+// Declare internals
+
+var internals = {};
+
+
+// Test shortcuts
+
+var lab = exports.lab = Lab.script();
+var expect = Code.expect;
+var describe = lab.experiment;
+var it = lab.test;
+
+
+describe('stringify()', function () {
+
+ it('stringifies a querystring object', function (done) {
+
+ expect(Qs.stringify({ a: 'b' })).to.equal('a=b');
+ expect(Qs.stringify({ a: 1 })).to.equal('a=1');
+ expect(Qs.stringify({ a: 1, b: 2 })).to.equal('a=1&b=2');
+ done();
+ });
+
+ it('stringifies a nested object', function (done) {
+
+ expect(Qs.stringify({ a: { b: 'c' } })).to.equal('a%5Bb%5D=c');
+ expect(Qs.stringify({ a: { b: { c: { d: 'e' } } } })).to.equal('a%5Bb%5D%5Bc%5D%5Bd%5D=e');
+ done();
+ });
+
+ it('stringifies an array value', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c', 'd'] })).to.equal('a%5B0%5D=b&a%5B1%5D=c&a%5B2%5D=d');
+ done();
+ });
+
+ it('omits array indices when asked', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c', 'd'] }, { indices: false })).to.equal('a=b&a=c&a=d');
+ done();
+ });
+
+ it('stringifies a nested array value', function (done) {
+
+ expect(Qs.stringify({ a: { b: ['c', 'd'] } })).to.equal('a%5Bb%5D%5B0%5D=c&a%5Bb%5D%5B1%5D=d');
+ done();
+ });
+
+ it('stringifies an object inside an array', function (done) {
+
+ expect(Qs.stringify({ a: [{ b: 'c' }] })).to.equal('a%5B0%5D%5Bb%5D=c');
+ expect(Qs.stringify({ a: [{ b: { c: [1] } }] })).to.equal('a%5B0%5D%5Bb%5D%5Bc%5D%5B0%5D=1');
+ done();
+ });
+
+ it('does not omit object keys when indices = false', function (done) {
+
+ expect(Qs.stringify({ a: [{ b: 'c' }] }, { indices: false })).to.equal('a%5Bb%5D=c');
+ done();
+ });
+
+ it('uses indices notation for arrays when indices=true', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c'] }, { indices: true })).to.equal('a%5B0%5D=b&a%5B1%5D=c');
+ done();
+ });
+
+ it('uses indices notation for arrays when no arrayFormat is specified', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c'] })).to.equal('a%5B0%5D=b&a%5B1%5D=c');
+ done();
+ });
+
+ it('uses indices notation for arrays when no arrayFormat=indices', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' })).to.equal('a%5B0%5D=b&a%5B1%5D=c');
+ done();
+ });
+
+ it('uses repeat notation for arrays when no arrayFormat=repeat', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' })).to.equal('a=b&a=c');
+ done();
+ });
+
+ it('uses brackets notation for arrays when no arrayFormat=brackets', function (done) {
+
+ expect(Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' })).to.equal('a%5B%5D=b&a%5B%5D=c');
+ done();
+ });
+
+ it('stringifies a complicated object', function (done) {
+
+ expect(Qs.stringify({ a: { b: 'c', d: 'e' } })).to.equal('a%5Bb%5D=c&a%5Bd%5D=e');
+ done();
+ });
+
+ it('stringifies an empty value', function (done) {
+
+ expect(Qs.stringify({ a: '' })).to.equal('a=');
+ expect(Qs.stringify({ a: '', b: '' })).to.equal('a=&b=');
+ expect(Qs.stringify({ a: null })).to.equal('a=');
+ expect(Qs.stringify({ a: { b: null } })).to.equal('a%5Bb%5D=');
+ done();
+ });
+
+ it('stringifies an empty object', function (done) {
+
+ var obj = Object.create(null);
+ obj.a = 'b';
+ expect(Qs.stringify(obj)).to.equal('a=b');
+ done();
+ });
+
+ it('returns an empty string for invalid input', function (done) {
+
+ expect(Qs.stringify(undefined)).to.equal('');
+ expect(Qs.stringify(false)).to.equal('');
+ expect(Qs.stringify(null)).to.equal('');
+ expect(Qs.stringify('')).to.equal('');
+ done();
+ });
+
+ it('stringifies an object with an empty object as a child', function (done) {
+
+ var obj = {
+ a: Object.create(null)
+ };
+
+ obj.a.b = 'c';
+ expect(Qs.stringify(obj)).to.equal('a%5Bb%5D=c');
+ done();
+ });
+
+ it('drops keys with a value of undefined', function (done) {
+
+ expect(Qs.stringify({ a: undefined })).to.equal('');
+ expect(Qs.stringify({ a: { b: undefined, c: null } })).to.equal('a%5Bc%5D=');
+ done();
+ });
+
+ it('url encodes values', function (done) {
+
+ expect(Qs.stringify({ a: 'b c' })).to.equal('a=b%20c');
+ done();
+ });
+
+ it('stringifies a date', function (done) {
+
+ var now = new Date();
+ var str = 'a=' + encodeURIComponent(now.toISOString());
+ expect(Qs.stringify({ a: now })).to.equal(str);
+ done();
+ });
+
+ it('stringifies the weird object from qs', function (done) {
+
+ expect(Qs.stringify({ 'my weird field': 'q1!2"\'w$5&7/z8)?' })).to.equal('my%20weird%20field=q1!2%22\'w%245%267%2Fz8)%3F');
+ done();
+ });
+
+ it('skips properties that are part of the object prototype', function (done) {
+
+ Object.prototype.crash = 'test';
+ expect(Qs.stringify({ a: 'b'})).to.equal('a=b');
+ expect(Qs.stringify({ a: { b: 'c' } })).to.equal('a%5Bb%5D=c');
+ delete Object.prototype.crash;
+ done();
+ });
+
+ it('stringifies boolean values', function (done) {
+
+ expect(Qs.stringify({ a: true })).to.equal('a=true');
+ expect(Qs.stringify({ a: { b: true } })).to.equal('a%5Bb%5D=true');
+ expect(Qs.stringify({ b: false })).to.equal('b=false');
+ expect(Qs.stringify({ b: { c: false } })).to.equal('b%5Bc%5D=false');
+ done();
+ });
+
+ it('stringifies buffer values', function (done) {
+
+ expect(Qs.stringify({ a: new Buffer('test') })).to.equal('a=test');
+ expect(Qs.stringify({ a: { b: new Buffer('test') } })).to.equal('a%5Bb%5D=test');
+ done();
+ });
+
+ it('stringifies an object using an alternative delimiter', function (done) {
+
+ expect(Qs.stringify({ a: 'b', c: 'd' }, { delimiter: ';' })).to.equal('a=b;c=d');
+ done();
+ });
+
+ it('doesn\'t blow up when Buffer global is missing', function (done) {
+
+ var tempBuffer = global.Buffer;
+ delete global.Buffer;
+ expect(Qs.stringify({ a: 'b', c: 'd' })).to.equal('a=b&c=d');
+ global.Buffer = tempBuffer;
+ done();
+ });
+});
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/HISTORY.md
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/HISTORY.md b/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/HISTORY.md
new file mode 100644
index 0000000..1bb53bd
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/HISTORY.md
@@ -0,0 +1,35 @@
+1.0.2 / 2014-09-08
+==================
+
+ * Support Node.js 0.6
+
+1.0.1 / 2014-09-07
+==================
+
+ * Move repository to jshttp
+
+1.0.0 / 2013-12-11
+==================
+
+ * Add repository to package.json
+ * Add MIT license
+
+0.0.4 / 2012-06-17
+==================
+
+ * Change ret -1 for unsatisfiable and -2 when invalid
+
+0.0.3 / 2012-06-17
+==================
+
+ * Fix last-byte-pos default to len - 1
+
+0.0.2 / 2012-06-14
+==================
+
+ * Add `.type`
+
+0.0.1 / 2012-06-11
+==================
+
+ * Initial release
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/LICENSE
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/LICENSE b/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/LICENSE
new file mode 100644
index 0000000..a491841
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/LICENSE
@@ -0,0 +1,22 @@
+(The MIT License)
+
+Copyright (c) 2012-2014 TJ Holowaychuk <vision-media.ca>
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/README.md
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/README.md b/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/README.md
new file mode 100644
index 0000000..6a2682f
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/README.md
@@ -0,0 +1,48 @@
+# range-parser
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Node.js Version][node-version-image]][node-version-url]
+[![Build Status][travis-image]][travis-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+
+Range header field parser.
+
+## Installation
+
+```
+$ npm install range-parser
+```
+
+## Examples
+
+```js
+assert(-1 == parse(200, 'bytes=500-20'));
+assert(-2 == parse(200, 'bytes=malformed'));
+parse(200, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 199 }]));
+parse(1000, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 499 }]));
+parse(1000, 'bytes=40-80').should.eql(arr('bytes', [{ start: 40, end: 80 }]));
+parse(1000, 'bytes=-500').should.eql(arr('bytes', [{ start: 500, end: 999 }]));
+parse(1000, 'bytes=-400').should.eql(arr('bytes', [{ start: 600, end: 999 }]));
+parse(1000, 'bytes=500-').should.eql(arr('bytes', [{ start: 500, end: 999 }]));
+parse(1000, 'bytes=400-').should.eql(arr('bytes', [{ start: 400, end: 999 }]));
+parse(1000, 'bytes=0-0').should.eql(arr('bytes', [{ start: 0, end: 0 }]));
+parse(1000, 'bytes=-1').should.eql(arr('bytes', [{ start: 999, end: 999 }]));
+parse(1000, 'items=0-5').should.eql(arr('items', [{ start: 0, end: 5 }]));
+parse(1000, 'bytes=40-80,-1').should.eql(arr('bytes', [{ start: 40, end: 80 }, { start: 999, end: 999 }]));
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/range-parser.svg?style=flat
+[npm-url]: https://npmjs.org/package/range-parser
+[node-version-image]: https://img.shields.io/badge/node.js-%3E%3D_0.6-brightgreen.svg?style=flat
+[node-version-url]: http://nodejs.org/download/
+[travis-image]: https://img.shields.io/travis/jshttp/range-parser.svg?style=flat
+[travis-url]: https://travis-ci.org/jshttp/range-parser
+[coveralls-image]: https://img.shields.io/coveralls/jshttp/range-parser.svg?style=flat
+[coveralls-url]: https://coveralls.io/r/jshttp/range-parser
+[downloads-image]: https://img.shields.io/npm/dm/range-parser.svg?style=flat
+[downloads-url]: https://npmjs.org/package/range-parser
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/index.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/index.js b/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/index.js
new file mode 100644
index 0000000..09a6c40
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/index.js
@@ -0,0 +1,49 @@
+
+/**
+ * Parse "Range" header `str` relative to the given file `size`.
+ *
+ * @param {Number} size
+ * @param {String} str
+ * @return {Array}
+ * @api public
+ */
+
+module.exports = function(size, str){
+ var valid = true;
+ var i = str.indexOf('=');
+
+ if (-1 == i) return -2;
+
+ var arr = str.slice(i + 1).split(',').map(function(range){
+ var range = range.split('-')
+ , start = parseInt(range[0], 10)
+ , end = parseInt(range[1], 10);
+
+ // -nnn
+ if (isNaN(start)) {
+ start = size - end;
+ end = size - 1;
+ // nnn-
+ } else if (isNaN(end)) {
+ end = size - 1;
+ }
+
+ // limit last-byte-pos to current length
+ if (end > size - 1) end = size - 1;
+
+ // invalid
+ if (isNaN(start)
+ || isNaN(end)
+ || start > end
+ || start < 0) valid = false;
+
+ return {
+ start: start,
+ end: end
+ };
+ });
+
+ arr.type = str.slice(0, i);
+
+ return valid ? arr : -1;
+};
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/package.json
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/package.json b/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/package.json
new file mode 100644
index 0000000..bb3cab0
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/range-parser/package.json
@@ -0,0 +1,76 @@
+{
+ "name": "range-parser",
+ "author": {
+ "name": "TJ Holowaychuk",
+ "email": "tj@vision-media.ca",
+ "url": "http://tjholowaychuk.com"
+ },
+ "description": "Range header field string parser",
+ "version": "1.0.2",
+ "license": "MIT",
+ "keywords": [
+ "range",
+ "parser",
+ "http"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/jshttp/range-parser.git"
+ },
+ "devDependencies": {
+ "istanbul": "0",
+ "mocha": "1",
+ "should": "2"
+ },
+ "files": [
+ "HISTORY.md",
+ "LICENSE",
+ "index.js"
+ ],
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec --require should",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --require should",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot --require should"
+ },
+ "gitHead": "ae23b02ce705b56e7f7c48e832d41fa710227ecc",
+ "bugs": {
+ "url": "https://github.com/jshttp/range-parser/issues"
+ },
+ "homepage": "https://github.com/jshttp/range-parser",
+ "_id": "range-parser@1.0.2",
+ "_shasum": "06a12a42e5131ba8e457cd892044867f2344e549",
+ "_from": "range-parser@>=1.0.2 <1.1.0",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ "maintainers": [
+ {
+ "name": "tjholowaychuk",
+ "email": "tj@vision-media.ca"
+ },
+ {
+ "name": "jonathanong",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ {
+ "name": "dougwilson",
+ "email": "doug@somethingdoug.com"
+ },
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "06a12a42e5131ba8e457cd892044867f2344e549",
+ "tarball": "http://registry.npmjs.org/range-parser/-/range-parser-1.0.2.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.0.2.tgz",
+ "readme": "ERROR: No README data found!"
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/HISTORY.md
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/HISTORY.md b/modules/webconfig/nodejs/node_modules/express/node_modules/send/HISTORY.md
new file mode 100644
index 0000000..1f20361
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/send/HISTORY.md
@@ -0,0 +1,261 @@
+0.12.2 / 2015-03-13
+===================
+
+ * Throw errors early for invalid `extensions` or `index` options
+ * deps: debug@~2.1.3
+ - Fix high intensity foreground color for bold
+ - deps: ms@0.7.0
+
+0.12.1 / 2015-02-17
+===================
+
+ * Fix regression sending zero-length files
+
+0.12.0 / 2015-02-16
+===================
+
+ * Always read the stat size from the file
+ * Fix mutating passed-in `options`
+ * deps: mime@1.3.4
+
+0.11.1 / 2015-01-20
+===================
+
+ * Fix `root` path disclosure
+
+0.11.0 / 2015-01-05
+===================
+
+ * deps: debug@~2.1.1
+ * deps: etag@~1.5.1
+ - deps: crc@3.2.1
+ * deps: ms@0.7.0
+ - Add `milliseconds`
+ - Add `msecs`
+ - Add `secs`
+ - Add `mins`
+ - Add `hrs`
+ - Add `yrs`
+ * deps: on-finished@~2.2.0
+
+0.10.1 / 2014-10-22
+===================
+
+ * deps: on-finished@~2.1.1
+ - Fix handling of pipelined requests
+
+0.10.0 / 2014-10-15
+===================
+
+ * deps: debug@~2.1.0
+ - Implement `DEBUG_FD` env variable support
+ * deps: depd@~1.0.0
+ * deps: etag@~1.5.0
+ - Improve string performance
+ - Slightly improve speed for weak ETags over 1KB
+
+0.9.3 / 2014-09-24
+==================
+
+ * deps: etag@~1.4.0
+ - Support "fake" stats objects
+
+0.9.2 / 2014-09-15
+==================
+
+ * deps: depd@0.4.5
+ * deps: etag@~1.3.1
+ * deps: range-parser@~1.0.2
+
+0.9.1 / 2014-09-07
+==================
+
+ * deps: fresh@0.2.4
+
+0.9.0 / 2014-09-07
+==================
+
+ * Add `lastModified` option
+ * Use `etag` to generate `ETag` header
+ * deps: debug@~2.0.0
+
+0.8.5 / 2014-09-04
+==================
+
+ * Fix malicious path detection for empty string path
+
+0.8.4 / 2014-09-04
+==================
+
+ * Fix a path traversal issue when using `root`
+
+0.8.3 / 2014-08-16
+==================
+
+ * deps: destroy@1.0.3
+ - renamed from dethroy
+ * deps: on-finished@2.1.0
+
+0.8.2 / 2014-08-14
+==================
+
+ * Work around `fd` leak in Node.js 0.10 for `fs.ReadStream`
+ * deps: dethroy@1.0.2
+
+0.8.1 / 2014-08-05
+==================
+
+ * Fix `extensions` behavior when file already has extension
+
+0.8.0 / 2014-08-05
+==================
+
+ * Add `extensions` option
+
+0.7.4 / 2014-08-04
+==================
+
+ * Fix serving index files without root dir
+
+0.7.3 / 2014-07-29
+==================
+
+ * Fix incorrect 403 on Windows and Node.js 0.11
+
+0.7.2 / 2014-07-27
+==================
+
+ * deps: depd@0.4.4
+ - Work-around v8 generating empty stack traces
+
+0.7.1 / 2014-07-26
+==================
+
+ * deps: depd@0.4.3
+ - Fix exception when global `Error.stackTraceLimit` is too low
+
+0.7.0 / 2014-07-20
+==================
+
+ * Deprecate `hidden` option; use `dotfiles` option
+ * Add `dotfiles` option
+ * deps: debug@1.0.4
+ * deps: depd@0.4.2
+ - Add `TRACE_DEPRECATION` environment variable
+ - Remove non-standard grey color from color output
+ - Support `--no-deprecation` argument
+ - Support `--trace-deprecation` argument
+
+0.6.0 / 2014-07-11
+==================
+
+ * Deprecate `from` option; use `root` option
+ * Deprecate `send.etag()` -- use `etag` in `options`
+ * Deprecate `send.hidden()` -- use `hidden` in `options`
+ * Deprecate `send.index()` -- use `index` in `options`
+ * Deprecate `send.maxage()` -- use `maxAge` in `options`
+ * Deprecate `send.root()` -- use `root` in `options`
+ * Cap `maxAge` value to 1 year
+ * deps: debug@1.0.3
+ - Add support for multiple wildcards in namespaces
+
+0.5.0 / 2014-06-28
+==================
+
+ * Accept string for `maxAge` (converted by `ms`)
+ * Add `headers` event
+ * Include link in default redirect response
+ * Use `EventEmitter.listenerCount` to count listeners
+
+0.4.3 / 2014-06-11
+==================
+
+ * Do not throw un-catchable error on file open race condition
+ * Use `escape-html` for HTML escaping
+ * deps: debug@1.0.2
+ - fix some debugging output colors on node.js 0.8
+ * deps: finished@1.2.2
+ * deps: fresh@0.2.2
+
+0.4.2 / 2014-06-09
+==================
+
+ * fix "event emitter leak" warnings
+ * deps: debug@1.0.1
+ * deps: finished@1.2.1
+
+0.4.1 / 2014-06-02
+==================
+
+ * Send `max-age` in `Cache-Control` in correct format
+
+0.4.0 / 2014-05-27
+==================
+
+ * Calculate ETag with md5 for reduced collisions
+ * Fix wrong behavior when index file matches directory
+ * Ignore stream errors after request ends
+ - Goodbye `EBADF, read`
+ * Skip directories in index file search
+ * deps: debug@0.8.1
+
+0.3.0 / 2014-04-24
+==================
+
+ * Fix sending files with dots without root set
+ * Coerce option types
+ * Accept API options in options object
+ * Set etags to "weak"
+ * Include file path in etag
+ * Make "Can't set headers after they are sent." catchable
+ * Send full entity-body for multi range requests
+ * Default directory access to 403 when index disabled
+ * Support multiple index paths
+ * Support "If-Range" header
+ * Control whether to generate etags
+ * deps: mime@1.2.11
+
+0.2.0 / 2014-01-29
+==================
+
+ * update range-parser and fresh
+
+0.1.4 / 2013-08-11
+==================
+
+ * update fresh
+
+0.1.3 / 2013-07-08
+==================
+
+ * Revert "Fix fd leak"
+
+0.1.2 / 2013-07-03
+==================
+
+ * Fix fd leak
+
+0.1.0 / 2012-08-25
+==================
+
+ * add options parameter to send() that is passed to fs.createReadStream() [kanongil]
+
+0.0.4 / 2012-08-16
+==================
+
+ * allow custom "Accept-Ranges" definition
+
+0.0.3 / 2012-07-16
+==================
+
+ * fix normalization of the root directory. Closes #3
+
+0.0.2 / 2012-07-09
+==================
+
+ * add passing of req explicitly for now (YUCK)
+
+0.0.1 / 2010-01-03
+==================
+
+ * Initial release
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/LICENSE
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/LICENSE b/modules/webconfig/nodejs/node_modules/express/node_modules/send/LICENSE
new file mode 100644
index 0000000..e4d595b
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/send/LICENSE
@@ -0,0 +1,23 @@
+(The MIT License)
+
+Copyright (c) 2012 TJ Holowaychuk
+Copyright (c) 2014-2015 Douglas Christopher Wilson
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/README.md
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/README.md b/modules/webconfig/nodejs/node_modules/express/node_modules/send/README.md
new file mode 100644
index 0000000..3586060
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/send/README.md
@@ -0,0 +1,195 @@
+# send
+
+[![NPM Version][npm-image]][npm-url]
+[![NPM Downloads][downloads-image]][downloads-url]
+[![Linux Build][travis-image]][travis-url]
+[![Windows Build][appveyor-image]][appveyor-url]
+[![Test Coverage][coveralls-image]][coveralls-url]
+[![Gratipay][gratipay-image]][gratipay-url]
+
+Send is a library for streaming files from the file system as a http response
+supporting partial responses (Ranges), conditional-GET negotiation, high test
+coverage, and granular events which may be leveraged to take appropriate actions
+in your application or framework.
+
+Looking to serve up entire folders mapped to URLs? Try [serve-static](https://www.npmjs.org/package/serve-static).
+
+## Installation
+
+```bash
+$ npm install send
+```
+
+## API
+
+```js
+var send = require('send')
+```
+
+### send(req, path, [options])
+
+Create a new `SendStream` for the given path to send to a `res`. The `req` is
+the Node.js HTTP request and the `path` is a urlencoded path to send (urlencoded,
+not the actual file-system path).
+
+#### Options
+
+##### dotfiles
+
+Set how "dotfiles" are treated when encountered. A dotfile is a file
+or directory that begins with a dot ("."). Note this check is done on
+the path itself without checking if the path actually exists on the
+disk. If `root` is specified, only the dotfiles above the root are
+checked (i.e. the root itself can be within a dotfile when when set
+to "deny").
+
+ - `'allow'` No special treatment for dotfiles.
+ - `'deny'` Send a 403 for any request for a dotfile.
+ - `'ignore'` Pretend like the dotfile does not exist and 404.
+
+The default value is _similar_ to `'ignore'`, with the exception that
+this default will not ignore the files within a directory that begins
+with a dot, for backward-compatibility.
+
+##### etag
+
+Enable or disable etag generation, defaults to true.
+
+##### extensions
+
+If a given file doesn't exist, try appending one of the given extensions,
+in the given order. By default, this is disabled (set to `false`). An
+example value that will serve extension-less HTML files: `['html', 'htm']`.
+This is skipped if the requested file already has an extension.
+
+##### index
+
+By default send supports "index.html" files, to disable this
+set `false` or to supply a new index pass a string or an array
+in preferred order.
+
+##### lastModified
+
+Enable or disable `Last-Modified` header, defaults to true. Uses the file
+system's last modified value.
+
+##### maxAge
+
+Provide a max-age in milliseconds for http caching, defaults to 0.
+This can also be a string accepted by the
+[ms](https://www.npmjs.org/package/ms#readme) module.
+
+##### root
+
+Serve files relative to `path`.
+
+### Events
+
+The `SendStream` is an event emitter and will emit the following events:
+
+ - `error` an error occurred `(err)`
+ - `directory` a directory was requested
+ - `file` a file was requested `(path, stat)`
+ - `headers` the headers are about to be set on a file `(res, path, stat)`
+ - `stream` file streaming has started `(stream)`
+ - `end` streaming has completed
+
+### .pipe
+
+The `pipe` method is used to pipe the response into the Node.js HTTP response
+object, typically `send(req, path, options).pipe(res)`.
+
+## Error-handling
+
+By default when no `error` listeners are present an automatic response will be
+made, otherwise you have full control over the response, aka you may show a 5xx
+page etc.
+
+## Caching
+
+It does _not_ perform internal caching, you should use a reverse proxy cache
+such as Varnish for this, or those fancy things called CDNs. If your
+application is small enough that it would benefit from single-node memory
+caching, it's small enough that it does not need caching at all ;).
+
+## Debugging
+
+To enable `debug()` instrumentation output export __DEBUG__:
+
+```
+$ DEBUG=send node app
+```
+
+## Running tests
+
+```
+$ npm install
+$ npm test
+```
+
+## Examples
+
+### Small example
+
+```js
+var http = require('http');
+var send = require('send');
+
+var app = http.createServer(function(req, res){
+ send(req, req.url).pipe(res);
+}).listen(3000);
+```
+
+Serving from a root directory with custom error-handling:
+
+```js
+var http = require('http');
+var send = require('send');
+var url = require('url');
+
+var app = http.createServer(function(req, res){
+ // your custom error-handling logic:
+ function error(err) {
+ res.statusCode = err.status || 500;
+ res.end(err.message);
+ }
+
+ // your custom headers
+ function headers(res, path, stat) {
+ // serve all files for download
+ res.setHeader('Content-Disposition', 'attachment');
+ }
+
+ // your custom directory handling logic:
+ function redirect() {
+ res.statusCode = 301;
+ res.setHeader('Location', req.url + '/');
+ res.end('Redirecting to ' + req.url + '/');
+ }
+
+ // transfer arbitrary files from within
+ // /www/example.com/public/*
+ send(req, url.parse(req.url).pathname, {root: '/www/example.com/public'})
+ .on('error', error)
+ .on('directory', redirect)
+ .on('headers', headers)
+ .pipe(res);
+}).listen(3000);
+```
+
+## License
+
+[MIT](LICENSE)
+
+[npm-image]: https://img.shields.io/npm/v/send.svg
+[npm-url]: https://npmjs.org/package/send
+[travis-image]: https://img.shields.io/travis/pillarjs/send/master.svg?label=linux
+[travis-url]: https://travis-ci.org/pillarjs/send
+[appveyor-image]: https://img.shields.io/appveyor/ci/dougwilson/send/master.svg?label=windows
+[appveyor-url]: https://ci.appveyor.com/project/dougwilson/send
+[coveralls-image]: https://img.shields.io/coveralls/pillarjs/send/master.svg
+[coveralls-url]: https://coveralls.io/r/pillarjs/send?branch=master
+[downloads-image]: https://img.shields.io/npm/dm/send.svg
+[downloads-url]: https://npmjs.org/package/send
+[gratipay-image]: https://img.shields.io/gratipay/dougwilson.svg
+[gratipay-url]: https://www.gratipay.com/dougwilson/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/index.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/index.js b/modules/webconfig/nodejs/node_modules/express/node_modules/send/index.js
new file mode 100644
index 0000000..594ccc1
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/send/index.js
@@ -0,0 +1,797 @@
+/*!
+ * send
+ * Copyright(c) 2012 TJ Holowaychuk
+ * Copyright(c) 2014-2015 Douglas Christopher Wilson
+ * MIT Licensed
+ */
+
+/**
+ * Module dependencies.
+ */
+
+var debug = require('debug')('send')
+var deprecate = require('depd')('send')
+var destroy = require('destroy')
+var escapeHtml = require('escape-html')
+ , parseRange = require('range-parser')
+ , Stream = require('stream')
+ , mime = require('mime')
+ , fresh = require('fresh')
+ , path = require('path')
+ , http = require('http')
+ , fs = require('fs')
+ , normalize = path.normalize
+ , join = path.join
+var etag = require('etag')
+var EventEmitter = require('events').EventEmitter;
+var ms = require('ms');
+var onFinished = require('on-finished')
+
+/**
+ * Variables.
+ */
+var extname = path.extname
+var maxMaxAge = 60 * 60 * 24 * 365 * 1000; // 1 year
+var resolve = path.resolve
+var sep = path.sep
+var toString = Object.prototype.toString
+var upPathRegexp = /(?:^|[\\\/])\.\.(?:[\\\/]|$)/
+
+/**
+ * Expose `send`.
+ */
+
+exports = module.exports = send;
+
+/**
+ * Expose mime module.
+ */
+
+exports.mime = mime;
+
+/**
+ * Shim EventEmitter.listenerCount for node.js < 0.10
+ */
+
+/* istanbul ignore next */
+var listenerCount = EventEmitter.listenerCount
+ || function(emitter, type){ return emitter.listeners(type).length; };
+
+/**
+ * Return a `SendStream` for `req` and `path`.
+ *
+ * @param {Request} req
+ * @param {String} path
+ * @param {object} [options]
+ * @return {SendStream}
+ * @api public
+ */
+
+function send(req, path, options) {
+ return new SendStream(req, path, options);
+}
+
+/**
+ * Initialize a `SendStream` with the given `path`.
+ *
+ * @param {Request} req
+ * @param {String} path
+ * @param {object} [options]
+ * @api private
+ */
+
+function SendStream(req, path, options) {
+ var opts = options || {}
+
+ this.options = opts
+ this.path = path
+ this.req = req
+
+ this._etag = opts.etag !== undefined
+ ? Boolean(opts.etag)
+ : true
+
+ this._dotfiles = opts.dotfiles !== undefined
+ ? opts.dotfiles
+ : 'ignore'
+
+ if (['allow', 'deny', 'ignore'].indexOf(this._dotfiles) === -1) {
+ throw new TypeError('dotfiles option must be "allow", "deny", or "ignore"')
+ }
+
+ this._hidden = Boolean(opts.hidden)
+
+ if (opts.hidden !== undefined) {
+ deprecate('hidden: use dotfiles: \'' + (this._hidden ? 'allow' : 'ignore') + '\' instead')
+ }
+
+ // legacy support
+ if (opts.dotfiles === undefined) {
+ this._dotfiles = undefined
+ }
+
+ this._extensions = opts.extensions !== undefined
+ ? normalizeList(opts.extensions, 'extensions option')
+ : []
+
+ this._index = opts.index !== undefined
+ ? normalizeList(opts.index, 'index option')
+ : ['index.html']
+
+ this._lastModified = opts.lastModified !== undefined
+ ? Boolean(opts.lastModified)
+ : true
+
+ this._maxage = opts.maxAge || opts.maxage
+ this._maxage = typeof this._maxage === 'string'
+ ? ms(this._maxage)
+ : Number(this._maxage)
+ this._maxage = !isNaN(this._maxage)
+ ? Math.min(Math.max(0, this._maxage), maxMaxAge)
+ : 0
+
+ this._root = opts.root
+ ? resolve(opts.root)
+ : null
+
+ if (!this._root && opts.from) {
+ this.from(opts.from)
+ }
+}
+
+/**
+ * Inherits from `Stream.prototype`.
+ */
+
+SendStream.prototype.__proto__ = Stream.prototype;
+
+/**
+ * Enable or disable etag generation.
+ *
+ * @param {Boolean} val
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.etag = deprecate.function(function etag(val) {
+ val = Boolean(val);
+ debug('etag %s', val);
+ this._etag = val;
+ return this;
+}, 'send.etag: pass etag as option');
+
+/**
+ * Enable or disable "hidden" (dot) files.
+ *
+ * @param {Boolean} path
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.hidden = deprecate.function(function hidden(val) {
+ val = Boolean(val);
+ debug('hidden %s', val);
+ this._hidden = val;
+ this._dotfiles = undefined
+ return this;
+}, 'send.hidden: use dotfiles option');
+
+/**
+ * Set index `paths`, set to a falsy
+ * value to disable index support.
+ *
+ * @param {String|Boolean|Array} paths
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.index = deprecate.function(function index(paths) {
+ var index = !paths ? [] : normalizeList(paths, 'paths argument');
+ debug('index %o', paths);
+ this._index = index;
+ return this;
+}, 'send.index: pass index as option');
+
+/**
+ * Set root `path`.
+ *
+ * @param {String} path
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.root = function(path){
+ path = String(path);
+ this._root = resolve(path)
+ return this;
+};
+
+SendStream.prototype.from = deprecate.function(SendStream.prototype.root,
+ 'send.from: pass root as option');
+
+SendStream.prototype.root = deprecate.function(SendStream.prototype.root,
+ 'send.root: pass root as option');
+
+/**
+ * Set max-age to `maxAge`.
+ *
+ * @param {Number} maxAge
+ * @return {SendStream}
+ * @api public
+ */
+
+SendStream.prototype.maxage = deprecate.function(function maxage(maxAge) {
+ maxAge = typeof maxAge === 'string'
+ ? ms(maxAge)
+ : Number(maxAge);
+ if (isNaN(maxAge)) maxAge = 0;
+ if (Infinity == maxAge) maxAge = 60 * 60 * 24 * 365 * 1000;
+ debug('max-age %d', maxAge);
+ this._maxage = maxAge;
+ return this;
+}, 'send.maxage: pass maxAge as option');
+
+/**
+ * Emit error with `status`.
+ *
+ * @param {Number} status
+ * @api private
+ */
+
+SendStream.prototype.error = function(status, err){
+ var res = this.res;
+ var msg = http.STATUS_CODES[status];
+
+ err = err || new Error(msg);
+ err.status = status;
+
+ // emit if listeners instead of responding
+ if (listenerCount(this, 'error') !== 0) {
+ return this.emit('error', err);
+ }
+
+ // wipe all existing headers
+ res._headers = undefined;
+
+ res.statusCode = err.status;
+ res.end(msg);
+};
+
+/**
+ * Check if the pathname ends with "/".
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.hasTrailingSlash = function(){
+ return '/' == this.path[this.path.length - 1];
+};
+
+/**
+ * Check if this is a conditional GET request.
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isConditionalGET = function(){
+ return this.req.headers['if-none-match']
+ || this.req.headers['if-modified-since'];
+};
+
+/**
+ * Strip content-* header fields.
+ *
+ * @api private
+ */
+
+SendStream.prototype.removeContentHeaderFields = function(){
+ var res = this.res;
+ Object.keys(res._headers).forEach(function(field){
+ if (0 == field.indexOf('content')) {
+ res.removeHeader(field);
+ }
+ });
+};
+
+/**
+ * Respond with 304 not modified.
+ *
+ * @api private
+ */
+
+SendStream.prototype.notModified = function(){
+ var res = this.res;
+ debug('not modified');
+ this.removeContentHeaderFields();
+ res.statusCode = 304;
+ res.end();
+};
+
+/**
+ * Raise error that headers already sent.
+ *
+ * @api private
+ */
+
+SendStream.prototype.headersAlreadySent = function headersAlreadySent(){
+ var err = new Error('Can\'t set headers after they are sent.');
+ debug('headers already sent');
+ this.error(500, err);
+};
+
+/**
+ * Check if the request is cacheable, aka
+ * responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}).
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isCachable = function(){
+ var res = this.res;
+ return (res.statusCode >= 200 && res.statusCode < 300) || 304 == res.statusCode;
+};
+
+/**
+ * Handle stat() error.
+ *
+ * @param {Error} err
+ * @api private
+ */
+
+SendStream.prototype.onStatError = function(err){
+ var notfound = ['ENOENT', 'ENAMETOOLONG', 'ENOTDIR'];
+ if (~notfound.indexOf(err.code)) return this.error(404, err);
+ this.error(500, err);
+};
+
+/**
+ * Check if the cache is fresh.
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isFresh = function(){
+ return fresh(this.req.headers, this.res._headers);
+};
+
+/**
+ * Check if the range is fresh.
+ *
+ * @return {Boolean}
+ * @api private
+ */
+
+SendStream.prototype.isRangeFresh = function isRangeFresh(){
+ var ifRange = this.req.headers['if-range'];
+
+ if (!ifRange) return true;
+
+ return ~ifRange.indexOf('"')
+ ? ~ifRange.indexOf(this.res._headers['etag'])
+ : Date.parse(this.res._headers['last-modified']) <= Date.parse(ifRange);
+};
+
+/**
+ * Redirect to `path`.
+ *
+ * @param {String} path
+ * @api private
+ */
+
+SendStream.prototype.redirect = function(path){
+ if (listenerCount(this, 'directory') !== 0) {
+ return this.emit('directory');
+ }
+
+ if (this.hasTrailingSlash()) return this.error(403);
+ var res = this.res;
+ path += '/';
+ res.statusCode = 301;
+ res.setHeader('Content-Type', 'text/html; charset=utf-8');
+ res.setHeader('Location', path);
+ res.end('Redirecting to <a href="' + escapeHtml(path) + '">' + escapeHtml(path) + '</a>\n');
+};
+
+/**
+ * Pipe to `res.
+ *
+ * @param {Stream} res
+ * @return {Stream} res
+ * @api public
+ */
+
+SendStream.prototype.pipe = function(res){
+ var self = this
+ , args = arguments
+ , root = this._root;
+
+ // references
+ this.res = res;
+
+ // decode the path
+ var path = decode(this.path)
+ if (path === -1) return this.error(400)
+
+ // null byte(s)
+ if (~path.indexOf('\0')) return this.error(400);
+
+ var parts
+ if (root !== null) {
+ // malicious path
+ if (upPathRegexp.test(normalize('.' + sep + path))) {
+ debug('malicious path "%s"', path)
+ return this.error(403)
+ }
+
+ // join / normalize from optional root dir
+ path = normalize(join(root, path))
+ root = normalize(root + sep)
+
+ // explode path parts
+ parts = path.substr(root.length).split(sep)
+ } else {
+ // ".." is malicious without "root"
+ if (upPathRegexp.test(path)) {
+ debug('malicious path "%s"', path)
+ return this.error(403)
+ }
+
+ // explode path parts
+ parts = normalize(path).split(sep)
+
+ // resolve the path
+ path = resolve(path)
+ }
+
+ // dotfile handling
+ if (containsDotFile(parts)) {
+ var access = this._dotfiles
+
+ // legacy support
+ if (access === undefined) {
+ access = parts[parts.length - 1][0] === '.'
+ ? (this._hidden ? 'allow' : 'ignore')
+ : 'allow'
+ }
+
+ debug('%s dotfile "%s"', access, path)
+ switch (access) {
+ case 'allow':
+ break
+ case 'deny':
+ return this.error(403)
+ case 'ignore':
+ default:
+ return this.error(404)
+ }
+ }
+
+ // index file support
+ if (this._index.length && this.path[this.path.length - 1] === '/') {
+ this.sendIndex(path);
+ return res;
+ }
+
+ this.sendFile(path);
+ return res;
+};
+
+/**
+ * Transfer `path`.
+ *
+ * @param {String} path
+ * @api public
+ */
+
+SendStream.prototype.send = function(path, stat){
+ var len = stat.size;
+ var options = this.options
+ var opts = {}
+ var res = this.res;
+ var req = this.req;
+ var ranges = req.headers.range;
+ var offset = options.start || 0;
+
+ if (res._header) {
+ // impossible to send now
+ return this.headersAlreadySent();
+ }
+
+ debug('pipe "%s"', path)
+
+ // set header fields
+ this.setHeader(path, stat);
+
+ // set content-type
+ this.type(path);
+
+ // conditional GET support
+ if (this.isConditionalGET()
+ && this.isCachable()
+ && this.isFresh()) {
+ return this.notModified();
+ }
+
+ // adjust len to start/end options
+ len = Math.max(0, len - offset);
+ if (options.end !== undefined) {
+ var bytes = options.end - offset + 1;
+ if (len > bytes) len = bytes;
+ }
+
+ // Range support
+ if (ranges) {
+ ranges = parseRange(len, ranges);
+
+ // If-Range support
+ if (!this.isRangeFresh()) {
+ debug('range stale');
+ ranges = -2;
+ }
+
+ // unsatisfiable
+ if (-1 == ranges) {
+ debug('range unsatisfiable');
+ res.setHeader('Content-Range', 'bytes */' + stat.size);
+ return this.error(416);
+ }
+
+ // valid (syntactically invalid/multiple ranges are treated as a regular response)
+ if (-2 != ranges && ranges.length === 1) {
+ debug('range %j', ranges);
+
+ // Content-Range
+ res.statusCode = 206;
+ res.setHeader('Content-Range', 'bytes '
+ + ranges[0].start
+ + '-'
+ + ranges[0].end
+ + '/'
+ + len);
+
+ offset += ranges[0].start;
+ len = ranges[0].end - ranges[0].start + 1;
+ }
+ }
+
+ // clone options
+ for (var prop in options) {
+ opts[prop] = options[prop]
+ }
+
+ // set read options
+ opts.start = offset
+ opts.end = Math.max(offset, offset + len - 1)
+
+ // content-length
+ res.setHeader('Content-Length', len);
+
+ // HEAD support
+ if ('HEAD' == req.method) return res.end();
+
+ this.stream(path, opts)
+};
+
+/**
+ * Transfer file for `path`.
+ *
+ * @param {String} path
+ * @api private
+ */
+SendStream.prototype.sendFile = function sendFile(path) {
+ var i = 0
+ var self = this
+
+ debug('stat "%s"', path);
+ fs.stat(path, function onstat(err, stat) {
+ if (err && err.code === 'ENOENT'
+ && !extname(path)
+ && path[path.length - 1] !== sep) {
+ // not found, check extensions
+ return next(err)
+ }
+ if (err) return self.onStatError(err)
+ if (stat.isDirectory()) return self.redirect(self.path)
+ self.emit('file', path, stat)
+ self.send(path, stat)
+ })
+
+ function next(err) {
+ if (self._extensions.length <= i) {
+ return err
+ ? self.onStatError(err)
+ : self.error(404)
+ }
+
+ var p = path + '.' + self._extensions[i++]
+
+ debug('stat "%s"', p)
+ fs.stat(p, function (err, stat) {
+ if (err) return next(err)
+ if (stat.isDirectory()) return next()
+ self.emit('file', p, stat)
+ self.send(p, stat)
+ })
+ }
+}
+
+/**
+ * Transfer index for `path`.
+ *
+ * @param {String} path
+ * @api private
+ */
+SendStream.prototype.sendIndex = function sendIndex(path){
+ var i = -1;
+ var self = this;
+
+ function next(err){
+ if (++i >= self._index.length) {
+ if (err) return self.onStatError(err);
+ return self.error(404);
+ }
+
+ var p = join(path, self._index[i]);
+
+ debug('stat "%s"', p);
+ fs.stat(p, function(err, stat){
+ if (err) return next(err);
+ if (stat.isDirectory()) return next();
+ self.emit('file', p, stat);
+ self.send(p, stat);
+ });
+ }
+
+ next();
+};
+
+/**
+ * Stream `path` to the response.
+ *
+ * @param {String} path
+ * @param {Object} options
+ * @api private
+ */
+
+SendStream.prototype.stream = function(path, options){
+ // TODO: this is all lame, refactor meeee
+ var finished = false;
+ var self = this;
+ var res = this.res;
+ var req = this.req;
+
+ // pipe
+ var stream = fs.createReadStream(path, options);
+ this.emit('stream', stream);
+ stream.pipe(res);
+
+ // response finished, done with the fd
+ onFinished(res, function onfinished(){
+ finished = true;
+ destroy(stream);
+ });
+
+ // error handling code-smell
+ stream.on('error', function onerror(err){
+ // request already finished
+ if (finished) return;
+
+ // clean up stream
+ finished = true;
+ destroy(stream);
+
+ // error
+ self.onStatError(err);
+ });
+
+ // end
+ stream.on('end', function onend(){
+ self.emit('end');
+ });
+};
+
+/**
+ * Set content-type based on `path`
+ * if it hasn't been explicitly set.
+ *
+ * @param {String} path
+ * @api private
+ */
+
+SendStream.prototype.type = function(path){
+ var res = this.res;
+ if (res.getHeader('Content-Type')) return;
+ var type = mime.lookup(path);
+ var charset = mime.charsets.lookup(type);
+ debug('content-type %s', type);
+ res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : ''));
+};
+
+/**
+ * Set response header fields, most
+ * fields may be pre-defined.
+ *
+ * @param {String} path
+ * @param {Object} stat
+ * @api private
+ */
+
+SendStream.prototype.setHeader = function setHeader(path, stat){
+ var res = this.res;
+
+ this.emit('headers', res, path, stat);
+
+ if (!res.getHeader('Accept-Ranges')) res.setHeader('Accept-Ranges', 'bytes');
+ if (!res.getHeader('Date')) res.setHeader('Date', new Date().toUTCString());
+ if (!res.getHeader('Cache-Control')) res.setHeader('Cache-Control', 'public, max-age=' + Math.floor(this._maxage / 1000));
+
+ if (this._lastModified && !res.getHeader('Last-Modified')) {
+ var modified = stat.mtime.toUTCString()
+ debug('modified %s', modified)
+ res.setHeader('Last-Modified', modified)
+ }
+
+ if (this._etag && !res.getHeader('ETag')) {
+ var val = etag(stat)
+ debug('etag %s', val)
+ res.setHeader('ETag', val)
+ }
+};
+
+/**
+ * Determine if path parts contain a dotfile.
+ *
+ * @api private
+ */
+
+function containsDotFile(parts) {
+ for (var i = 0; i < parts.length; i++) {
+ if (parts[i][0] === '.') {
+ return true
+ }
+ }
+
+ return false
+}
+
+/**
+ * decodeURIComponent.
+ *
+ * Allows V8 to only deoptimize this fn instead of all
+ * of send().
+ *
+ * @param {String} path
+ * @api private
+ */
+
+function decode(path) {
+ try {
+ return decodeURIComponent(path)
+ } catch (err) {
+ return -1
+ }
+}
+
+/**
+ * Normalize the index option into an array.
+ *
+ * @param {boolean|string|array} val
+ * @param {string} name
+ * @private
+ */
+
+function normalizeList(val, name) {
+ var list = [].concat(val || [])
+
+ for (var i = 0; i < list.length; i++) {
+ if (typeof list[i] !== 'string') {
+ throw new TypeError(name + ' must be array of strings or false')
+ }
+ }
+
+ return list
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/.bin/mime
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/.bin/mime b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/.bin/mime
new file mode 120000
index 0000000..fbb7ee0
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/.bin/mime
@@ -0,0 +1 @@
+../mime/cli.js
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/destroy/README.md
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/destroy/README.md b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/destroy/README.md
new file mode 100644
index 0000000..665acb7
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/destroy/README.md
@@ -0,0 +1,38 @@
+# Destroy
+
+[![NPM version][npm-image]][npm-url]
+[![Build status][travis-image]][travis-url]
+[![Test coverage][coveralls-image]][coveralls-url]
+[![Dependency Status][david-image]][david-url]
+[![License][license-image]][license-url]
+[![Downloads][downloads-image]][downloads-url]
+[![Gittip][gittip-image]][gittip-url]
+
+Destroy a stream.
+
+## API
+
+```js
+var destroy = require('destroy')
+
+var fs = require('fs')
+var stream = fs.createReadStream('package.json')
+destroy(stream)
+```
+
+[npm-image]: https://img.shields.io/npm/v/destroy.svg?style=flat-square
+[npm-url]: https://npmjs.org/package/destroy
+[github-tag]: http://img.shields.io/github/tag/stream-utils/destroy.svg?style=flat-square
+[github-url]: https://github.com/stream-utils/destroy/tags
+[travis-image]: https://img.shields.io/travis/stream-utils/destroy.svg?style=flat-square
+[travis-url]: https://travis-ci.org/stream-utils/destroy
+[coveralls-image]: https://img.shields.io/coveralls/stream-utils/destroy.svg?style=flat-square
+[coveralls-url]: https://coveralls.io/r/stream-utils/destroy?branch=master
+[david-image]: http://img.shields.io/david/stream-utils/destroy.svg?style=flat-square
+[david-url]: https://david-dm.org/stream-utils/destroy
+[license-image]: http://img.shields.io/npm/l/destroy.svg?style=flat-square
+[license-url]: LICENSE.md
+[downloads-image]: http://img.shields.io/npm/dm/destroy.svg?style=flat-square
+[downloads-url]: https://npmjs.org/package/destroy
+[gittip-image]: https://img.shields.io/gittip/jonathanong.svg?style=flat-square
+[gittip-url]: https://www.gittip.com/jonathanong/
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/destroy/index.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/destroy/index.js b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/destroy/index.js
new file mode 100644
index 0000000..b455217
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/destroy/index.js
@@ -0,0 +1,36 @@
+var ReadStream = require('fs').ReadStream
+var Stream = require('stream')
+
+module.exports = function destroy(stream) {
+ if (stream instanceof ReadStream) {
+ return destroyReadStream(stream)
+ }
+
+ if (!(stream instanceof Stream)) {
+ return stream
+ }
+
+ if (typeof stream.destroy === 'function') {
+ stream.destroy()
+ }
+
+ return stream
+}
+
+function destroyReadStream(stream) {
+ stream.destroy()
+
+ if (typeof stream.close === 'function') {
+ // node.js core bug work-around
+ stream.on('open', onopenClose)
+ }
+
+ return stream
+}
+
+function onopenClose() {
+ if (typeof this.fd === 'number') {
+ // actually close down the fd
+ this.close()
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/destroy/package.json
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/destroy/package.json b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/destroy/package.json
new file mode 100644
index 0000000..349991b
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/destroy/package.json
@@ -0,0 +1,67 @@
+{
+ "name": "destroy",
+ "description": "destroy a stream if possible",
+ "version": "1.0.3",
+ "author": {
+ "name": "Jonathan Ong",
+ "email": "me@jongleberry.com",
+ "url": "http://jongleberry.com"
+ },
+ "contributors": [
+ {
+ "name": "Douglas Christopher Wilson",
+ "email": "doug@somethingdoug.com"
+ }
+ ],
+ "license": "MIT",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/stream-utils/destroy.git"
+ },
+ "devDependencies": {
+ "istanbul": "0",
+ "mocha": "1"
+ },
+ "scripts": {
+ "test": "mocha --reporter spec",
+ "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot",
+ "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter dot"
+ },
+ "files": [
+ "index.js"
+ ],
+ "keywords": [
+ "stream",
+ "streams",
+ "destroy",
+ "cleanup",
+ "leak",
+ "fd"
+ ],
+ "gitHead": "50af95ece4a70202f9301bc3edc8f9fdbbad0f26",
+ "bugs": {
+ "url": "https://github.com/stream-utils/destroy/issues"
+ },
+ "homepage": "https://github.com/stream-utils/destroy",
+ "_id": "destroy@1.0.3",
+ "_shasum": "b433b4724e71fd8551d9885174851c5fc377e2c9",
+ "_from": "destroy@1.0.3",
+ "_npmVersion": "1.4.21",
+ "_npmUser": {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ },
+ "maintainers": [
+ {
+ "name": "jongleberry",
+ "email": "jonathanrichardong@gmail.com"
+ }
+ ],
+ "dist": {
+ "shasum": "b433b4724e71fd8551d9885174851c5fc377e2c9",
+ "tarball": "http://registry.npmjs.org/destroy/-/destroy-1.0.3.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.3.tgz",
+ "readme": "ERROR: No README data found!"
+}
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/.npmignore
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/.npmignore b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/.npmignore
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/LICENSE
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/LICENSE b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/LICENSE
new file mode 100644
index 0000000..451fc45
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/LICENSE
@@ -0,0 +1,19 @@
+Copyright (c) 2010 Benjamin Thomas, Robert Kieffer
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/README.md
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/README.md b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/README.md
new file mode 100644
index 0000000..506fbe5
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/README.md
@@ -0,0 +1,90 @@
+# mime
+
+Comprehensive MIME type mapping API based on mime-db module.
+
+## Install
+
+Install with [npm](http://github.com/isaacs/npm):
+
+ npm install mime
+
+## Contributing / Testing
+
+ npm run test
+
+## Command Line
+
+ mime [path_string]
+
+E.g.
+
+ > mime scripts/jquery.js
+ application/javascript
+
+## API - Queries
+
+### mime.lookup(path)
+Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.
+
+```js
+var mime = require('mime');
+
+mime.lookup('/path/to/file.txt'); // => 'text/plain'
+mime.lookup('file.txt'); // => 'text/plain'
+mime.lookup('.TXT'); // => 'text/plain'
+mime.lookup('htm'); // => 'text/html'
+```
+
+### mime.default_type
+Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)
+
+### mime.extension(type)
+Get the default extension for `type`
+
+```js
+mime.extension('text/html'); // => 'html'
+mime.extension('application/octet-stream'); // => 'bin'
+```
+
+### mime.charsets.lookup()
+
+Map mime-type to charset
+
+```js
+mime.charsets.lookup('text/plain'); // => 'UTF-8'
+```
+
+(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)
+
+## API - Defining Custom Types
+
+Custom type mappings can be added on a per-project basis via the following APIs.
+
+### mime.define()
+
+Add custom mime/extension mappings
+
+```js
+mime.define({
+ 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],
+ 'application/x-my-type': ['x-mt', 'x-mtt'],
+ // etc ...
+});
+
+mime.lookup('x-sft'); // => 'text/x-some-format'
+```
+
+The first entry in the extensions array is returned by `mime.extension()`. E.g.
+
+```js
+mime.extension('text/x-some-format'); // => 'x-sf'
+```
+
+### mime.load(filepath)
+
+Load mappings from an Apache ".types" format file
+
+```js
+mime.load('./my_project.types');
+```
+The .types file format is simple - See the `types` dir for examples.
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/build/build.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/build/build.js b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/build/build.js
new file mode 100644
index 0000000..ed5313e
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/build/build.js
@@ -0,0 +1,11 @@
+var db = require('mime-db');
+
+var mapByType = {};
+Object.keys(db).forEach(function(key) {
+ var extensions = db[key].extensions;
+ if (extensions) {
+ mapByType[key] = extensions;
+ }
+});
+
+console.log(JSON.stringify(mapByType));
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/build/test.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/build/test.js b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/build/test.js
new file mode 100644
index 0000000..58b9ba7
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/build/test.js
@@ -0,0 +1,57 @@
+/**
+ * Usage: node test.js
+ */
+
+var mime = require('../mime');
+var assert = require('assert');
+var path = require('path');
+
+//
+// Test mime lookups
+//
+
+assert.equal('text/plain', mime.lookup('text.txt')); // normal file
+assert.equal('text/plain', mime.lookup('TEXT.TXT')); // uppercase
+assert.equal('text/plain', mime.lookup('dir/text.txt')); // dir + file
+assert.equal('text/plain', mime.lookup('.text.txt')); // hidden file
+assert.equal('text/plain', mime.lookup('.txt')); // nameless
+assert.equal('text/plain', mime.lookup('txt')); // extension-only
+assert.equal('text/plain', mime.lookup('/txt')); // extension-less ()
+assert.equal('text/plain', mime.lookup('\\txt')); // Windows, extension-less
+assert.equal('application/octet-stream', mime.lookup('text.nope')); // unrecognized
+assert.equal('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default
+
+//
+// Test extensions
+//
+
+assert.equal('txt', mime.extension(mime.types.text));
+assert.equal('html', mime.extension(mime.types.htm));
+assert.equal('bin', mime.extension('application/octet-stream'));
+assert.equal('bin', mime.extension('application/octet-stream '));
+assert.equal('html', mime.extension(' text/html; charset=UTF-8'));
+assert.equal('html', mime.extension('text/html; charset=UTF-8 '));
+assert.equal('html', mime.extension('text/html; charset=UTF-8'));
+assert.equal('html', mime.extension('text/html ; charset=UTF-8'));
+assert.equal('html', mime.extension('text/html;charset=UTF-8'));
+assert.equal('html', mime.extension('text/Html;charset=UTF-8'));
+assert.equal(undefined, mime.extension('unrecognized'));
+
+//
+// Test node.types lookups
+//
+
+assert.equal('application/font-woff', mime.lookup('file.woff'));
+assert.equal('application/octet-stream', mime.lookup('file.buffer'));
+assert.equal('audio/mp4', mime.lookup('file.m4a'));
+assert.equal('font/opentype', mime.lookup('file.otf'));
+
+//
+// Test charsets
+//
+
+assert.equal('UTF-8', mime.charsets.lookup('text/plain'));
+assert.equal(undefined, mime.charsets.lookup(mime.types.js));
+assert.equal('fallback', mime.charsets.lookup('application/octet-stream', 'fallback'));
+
+console.log('\nAll tests passed');
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/cli.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/cli.js b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/cli.js
new file mode 100755
index 0000000..20b1ffe
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/cli.js
@@ -0,0 +1,8 @@
+#!/usr/bin/env node
+
+var mime = require('./mime.js');
+var file = process.argv[2];
+var type = mime.lookup(file);
+
+process.stdout.write(type + '\n');
+
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/mime.js
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/mime.js b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/mime.js
new file mode 100644
index 0000000..341b6a5
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/mime.js
@@ -0,0 +1,108 @@
+var path = require('path');
+var fs = require('fs');
+
+function Mime() {
+ // Map of extension -> mime type
+ this.types = Object.create(null);
+
+ // Map of mime type -> extension
+ this.extensions = Object.create(null);
+}
+
+/**
+ * Define mimetype -> extension mappings. Each key is a mime-type that maps
+ * to an array of extensions associated with the type. The first extension is
+ * used as the default extension for the type.
+ *
+ * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']});
+ *
+ * @param map (Object) type definitions
+ */
+Mime.prototype.define = function (map) {
+ for (var type in map) {
+ var exts = map[type];
+ for (var i = 0; i < exts.length; i++) {
+ if (process.env.DEBUG_MIME && this.types[exts]) {
+ console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' +
+ this.types[exts] + ' to ' + type);
+ }
+
+ this.types[exts[i]] = type;
+ }
+
+ // Default extension is the first one we encounter
+ if (!this.extensions[type]) {
+ this.extensions[type] = exts[0];
+ }
+ }
+};
+
+/**
+ * Load an Apache2-style ".types" file
+ *
+ * This may be called multiple times (it's expected). Where files declare
+ * overlapping types/extensions, the last file wins.
+ *
+ * @param file (String) path of file to load.
+ */
+Mime.prototype.load = function(file) {
+ this._loading = file;
+ // Read file and split into lines
+ var map = {},
+ content = fs.readFileSync(file, 'ascii'),
+ lines = content.split(/[\r\n]+/);
+
+ lines.forEach(function(line) {
+ // Clean up whitespace/comments, and split into fields
+ var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/);
+ map[fields.shift()] = fields;
+ });
+
+ this.define(map);
+
+ this._loading = null;
+};
+
+/**
+ * Lookup a mime type based on extension
+ */
+Mime.prototype.lookup = function(path, fallback) {
+ var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase();
+
+ return this.types[ext] || fallback || this.default_type;
+};
+
+/**
+ * Return file extension associated with a mime type
+ */
+Mime.prototype.extension = function(mimeType) {
+ var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase();
+ return this.extensions[type];
+};
+
+// Default instance
+var mime = new Mime();
+
+// Define built-in types
+mime.define(require('./types.json'));
+
+// Default type
+mime.default_type = mime.lookup('bin');
+
+//
+// Additional API specific to the default instance
+//
+
+mime.Mime = Mime;
+
+/**
+ * Lookup a charset based on mime type.
+ */
+mime.charsets = {
+ lookup: function(mimeType, fallback) {
+ // Assume text types are utf8
+ return (/^text\//).test(mimeType) ? 'UTF-8' : fallback;
+ }
+};
+
+module.exports = mime;
http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/0ef79031/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/package.json
----------------------------------------------------------------------
diff --git a/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/package.json b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/package.json
new file mode 100644
index 0000000..31e7669
--- /dev/null
+++ b/modules/webconfig/nodejs/node_modules/express/node_modules/send/node_modules/mime/package.json
@@ -0,0 +1,73 @@
+{
+ "author": {
+ "name": "Robert Kieffer",
+ "email": "robert@broofa.com",
+ "url": "http://github.com/broofa"
+ },
+ "scripts": {
+ "prepublish": "node build/build.js > types.json",
+ "test": "node build/test.js"
+ },
+ "bin": {
+ "mime": "cli.js"
+ },
+ "contributors": [
+ {
+ "name": "Benjamin Thomas",
+ "email": "benjamin@benjaminthomas.org",
+ "url": "http://github.com/bentomas"
+ }
+ ],
+ "description": "A comprehensive library for mime-type mapping",
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://raw.github.com/broofa/node-mime/master/LICENSE"
+ }
+ ],
+ "dependencies": {},
+ "devDependencies": {
+ "mime-db": "^1.2.0"
+ },
+ "keywords": [
+ "util",
+ "mime"
+ ],
+ "main": "mime.js",
+ "name": "mime",
+ "repository": {
+ "url": "git+https://github.com/broofa/node-mime.git",
+ "type": "git"
+ },
+ "version": "1.3.4",
+ "gitHead": "1628f6e0187095009dcef4805c3a49706f137974",
+ "bugs": {
+ "url": "https://github.com/broofa/node-mime/issues"
+ },
+ "homepage": "https://github.com/broofa/node-mime",
+ "_id": "mime@1.3.4",
+ "_shasum": "115f9e3b6b3daf2959983cb38f149a2d40eb5d53",
+ "_from": "mime@1.3.4",
+ "_npmVersion": "1.4.28",
+ "_npmUser": {
+ "name": "broofa",
+ "email": "robert@broofa.com"
+ },
+ "maintainers": [
+ {
+ "name": "broofa",
+ "email": "robert@broofa.com"
+ },
+ {
+ "name": "bentomas",
+ "email": "benjamin@benjaminthomas.org"
+ }
+ ],
+ "dist": {
+ "shasum": "115f9e3b6b3daf2959983cb38f149a2d40eb5d53",
+ "tarball": "http://registry.npmjs.org/mime/-/mime-1.3.4.tgz"
+ },
+ "directories": {},
+ "_resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz",
+ "readme": "ERROR: No README data found!"
+}