Disable Error overrides
This commit is contained in:
parent
57c638316e
commit
68f44878d3
@ -1,6 +1,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const binary_parser_1 = require("binary-parser");
|
||||
const types_1 = require("./types");
|
||||
const MAX_LABEL_SIZE = 63;
|
||||
var QueryTypes;
|
||||
(function (QueryTypes) {
|
||||
@ -152,6 +153,7 @@ class Request {
|
||||
packet.copy(bodyData, 0, 12, packet.length);
|
||||
this._header = headerParser.parse(headerData);
|
||||
this._header.AD = 0;
|
||||
this._header.RCODE = types_1.ErrorCodes.NoError;
|
||||
this._questions = parseQuestions(this._header.QDCOUNT, bodyData);
|
||||
}
|
||||
get header() {
|
||||
@ -161,6 +163,7 @@ class Request {
|
||||
return this._questions.map(e => e);
|
||||
}
|
||||
error(error) {
|
||||
if (this._header.RCODE === types_1.ErrorCodes.NoError)
|
||||
this._header.RCODE = error;
|
||||
}
|
||||
send() {
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nodename-core",
|
||||
"version": "0.1.4",
|
||||
"version": "0.1.5",
|
||||
"main": "lib/listener.js",
|
||||
"types": "lib/listener.d.ts",
|
||||
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
||||
|
@ -190,10 +190,12 @@ export class Request implements Message {
|
||||
|
||||
this._header = <any>headerParser.parse(headerData);
|
||||
this._header.AD = 0;
|
||||
this._header.RCODE = ErrorCodes.NoError;
|
||||
this._questions = parseQuestions(this._header.QDCOUNT, bodyData);
|
||||
}
|
||||
|
||||
error(error: ErrorCodes) {
|
||||
if (this._header.RCODE === ErrorCodes.NoError)
|
||||
this._header.RCODE = error;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user