From 2b318d47aa3c7031e2010f20cdd82c67eb9caef2 Mon Sep 17 00:00:00 2001 From: Fabian Stamm Date: Sat, 19 May 2018 16:10:16 +0200 Subject: [PATCH] Removing old code --- lib/request.js | 9 --------- lib/request.js.map | 2 +- src/request.ts | 13 ------------- 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/lib/request.js b/lib/request.js index b487b25..0edd0d6 100644 --- a/lib/request.js +++ b/lib/request.js @@ -134,15 +134,6 @@ class Request { answers.forEach(e => length += e.length); authority.forEach(e => length += e.length); additional.forEach(e => length += e.length); - // let questionsByteLength = 0; - // questions.forEach(e => questionsByteLength += e.length); - // let answersByteLength = 0; - // answers.forEach(e => answersByteLength += e.length) - // let authorityByteLength = 0; - // authority.forEach(e => authorityByteLength += e.length) - // let additionalByteLength = 0; - // additional.forEach(e => additionalByteLength += e.length) - // let length = 12 + questionsByteLength + answersByteLength + authorityByteLength + additionalByteLength; //Header is always 12 byte large if (length > this.max_size) { this._header.TC = 1; //Will ignore data, that exceeds length diff --git a/lib/request.js.map b/lib/request.js.map index 3985753..a80c196 100644 --- a/lib/request.js.map +++ b/lib/request.js.map @@ -1 +1 @@ -{"version":3,"file":"request.js","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":";;AAAA,iDAAsC;AACtC,mCAAuG;AAEvG,MAAM,YAAY,GAAW,IAAI,sBAAM,EAAE;KACrC,SAAS,CAAC,KAAK,CAAC;KAChB,MAAM,CAAC,IAAI,CAAC;KACZ,IAAI,CAAC,IAAI,CAAC;KACV,IAAI,CAAC,QAAQ,CAAC;KACd,IAAI,CAAC,IAAI,CAAC;KACV,IAAI,CAAC,IAAI,CAAC;KACV,IAAI,CAAC,IAAI,CAAC;KACV,IAAI,CAAC,IAAI,CAAC;KACV,IAAI,CAAC,GAAG,CAAC;KACT,IAAI,CAAC,IAAI,CAAC;KACV,IAAI,CAAC,IAAI,CAAC;KACV,IAAI,CAAC,OAAO,CAAC;KACb,MAAM,CAAC,SAAS,CAAC;KAC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AAC,MAAM,CAAC,CAAC;QACnC,IAAI,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QACzB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;QACrC,MAAM,IAAI,CAAC,CAAA;QACX,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;QACtC,MAAM,IAAI,CAAC,CAAA;QACX,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;QACrC,MAAM,IAAI,CAAC,CAAA;QACX,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QACxC,MAAM,IAAI,CAAC,CAAA;QACX,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC;IACf,CAAC;CACH;AAtED,wCAsEC"} \ No newline at end of file +{"version":3,"file":"request.js","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":";;AAAA,iDAAsC;AACtC,mCAAuG;AAEvG,MAAM,YAAY,GAAW,IAAI,sBAAM,EAAE;KACrC,SAAS,CAAC,KAAK,CAAC;KAChB,MAAM,CAAC,IAAI,CAAC;KACZ,IAAI,CAAC,IAAI,CAAC;KACV,IAAI,CAAC,QAAQ,CAAC;KACd,IAAI,CAAC,IAAI,CAAC;KACV,IAAI,CAAC,IAAI,CAAC;KACV,IAAI,CAAC,IAAI,CAAC;KACV,IAAI,CAAC,IAAI,CAAC;KACV,IAAI,CAAC,GAAG,CAAC;KACT,IAAI,CAAC,IAAI,CAAC;KACV,IAAI,CAAC,IAAI,CAAC;KACV,IAAI,CAAC,OAAO,CAAC;KACb,MAAM,CAAC,SAAS,CAAC;KACjB,MAAM,CAAC,SAAS,CAAC;KACjB,MAAM,CAAC,SAAS,CAAC;KACjB,MAAM,CAAC,SAA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,EAAE,MAAM,CAAC,CAAA;QACtC,MAAM,IAAI,CAAC,CAAA;QACX,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;QACrC,MAAM,IAAI,CAAC,CAAA;QACX,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QACxC,MAAM,IAAI,CAAC,CAAA;QACX,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC;IACf,CAAC;CACH;AAtED,wCAsEC"} \ No newline at end of file diff --git a/src/request.ts b/src/request.ts index 89cbc68..dce700b 100644 --- a/src/request.ts +++ b/src/request.ts @@ -144,19 +144,6 @@ export class Request implements IMessage { answers.forEach(e => length += e.length) authority.forEach(e => length += e.length) additional.forEach(e => length += e.length) - // let questionsByteLength = 0; - // questions.forEach(e => questionsByteLength += e.length); - - // let answersByteLength = 0; - // answers.forEach(e => answersByteLength += e.length) - - // let authorityByteLength = 0; - // authority.forEach(e => authorityByteLength += e.length) - - // let additionalByteLength = 0; - // additional.forEach(e => additionalByteLength += e.length) - - // let length = 12 + questionsByteLength + answersByteLength + authorityByteLength + additionalByteLength; //Header is always 12 byte large if (length > this.max_size) { this._header.TC = 1;