Skip to content

Commit

Permalink
Merge PRs #1, #2, jhs#3
Browse files Browse the repository at this point in the history
Fix %pXbUQg/kZJGH13GaxApbVcAwf5iYgeZ6AglQH8FPjt8=.sha256

 jhs#5 is not completely correct or necessary so is not merged.
  • Loading branch information
cel authored and cel committed Nov 6, 2016
4 parents fc1c0f3 + 5466b8b + bcc16d9 + a77ad84 commit 09c548d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions convenient.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

require('defaultable')(module,
{ 'convenient' : true
, 'ttl' : 3600
, 'ttl' : 10
}, function(module, exports, DEFS, require) {

function noop() {}
Expand Down Expand Up @@ -85,12 +85,6 @@ function final_response(res, value) {

function well_formed_record(record) {
record.class = record.class || 'IN'

var zone_minimum = DEFS.ttl
if(soa_record)
zone_minimum = soa_record.data.ttl

record.ttl = Math.max(record.ttl || 0, zone_minimum)
}
}

Expand Down
2 changes: 1 addition & 1 deletion encode.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ State.prototype.encode = function(full_domain, position_offset, option) {
, bytes

var i = 0
var max_iterations = 40 // Enough for 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa
var max_iterations = 127 // Theoretical upper limit for number of labels in a DNS name; see https://en.wikipedia.org/wiki/Subdomain#Overview

while(++i < max_iterations) {
if(domain == '') {
Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ Response.prototype.end = function(value) {
var self = this

var msg = convenient.final_response(self, value)
, data = msg.toBinary()
, data = msg ? msg.toBinary() : self.toBinary()

if(udp4Or6(self.connection.type)&& data.length > 512)
return self.emit('error', 'UDP responses greater than 512 bytes not yet implemented')
Expand Down

0 comments on commit 09c548d

Please sign in to comment.