Skip to content

dns from http resolved the domain with appended dot '.' cause getApiDescriptionFor error when getWellKnownBaseUrl  #10

@klouskingsley

Description

@klouskingsley

code here https://github.com/moneybutton/paymail-client/blob/master/src/dns-client.js#L87

for example

response from https://dns.google.com/resolve?name=_bsvalias._tcp.semo3d.com&type=SRV&cd=0

{
    "Status": 0,
    "TC": false,
    "RD": true,
    "RA": true,
    "AD": true,
    "CD": false,
    "Question": [
        {
            "name": "_bsvalias._tcp.semo3d.com.",
            "type": 33
        }
    ],
    "Answer": [
        {
            "name": "_bsvalias._tcp.semo3d.com.",
            "type": 33,
            "TTL": 1112,
            "data": "10 10 443 nemo.azure-api.net."
        }
    ]
}

get domain value: nemo.azure-api.net.
will cause error

nodejs.FetchError: request to https://nemo.azure-api.net.:443/.well-known/bsvalias failed, reason: read ECONNRESET\n at ClientRequest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions