mirror of
https://github.com/danog/dns.git
synced 2024-12-02 09:27:55 +01:00
Fixes
This commit is contained in:
parent
9f39244e3c
commit
0a90926342
@ -97,10 +97,7 @@ class NativeDecoder
|
||||
{
|
||||
/** @var \LibDNS\Records\Types\DomainName $domainName */
|
||||
$domainName = $this->typeBuilder->build(Types::DOMAIN_NAME);
|
||||
$labels = \explode('.', $name);
|
||||
if ('' !== $last = \array_pop($labels)) {
|
||||
$labels[] = $last;
|
||||
}
|
||||
$labels = \explode('.', rtrim($name, '.'));
|
||||
$domainName->setLabels($labels);
|
||||
|
||||
$question = $this->questionFactory->create($type);
|
||||
@ -190,10 +187,7 @@ class NativeDecoder
|
||||
if (!$encodingContext->isTruncated()) {
|
||||
/** @var \LibDNS\Records\Types\DomainName $domainName */
|
||||
$domainName = $this->typeBuilder->build(Types::DOMAIN_NAME);
|
||||
$labels = \explode('.', $record['host']);
|
||||
if ('' !== $last = \array_pop($labels)) {
|
||||
$labels[] = $last;
|
||||
}
|
||||
$labels = \explode('.', rtrim($record['host'], '.'));
|
||||
$domainName->setLabels($labels);
|
||||
|
||||
$packet = $encodingContext->getPacket();
|
||||
|
Loading…
Reference in New Issue
Block a user