Skip to content

2.0.0 has problems with parsing http_adress with only IP and port #1811

@joelse

Description

@joelse

You guys quickly fixed issue #1808, but now there's a problem when a host/domain name is not there. It's not immediately clear to me why, but if the input to SniffResponse.ParseToUri is something like 192.168.17.42:9200, fqdn becomes 192.168.17.4 and ip becomes 2, so the resulting URI becomes http://192.168.17.4:9200.

The following seems to work:

new Regex(@"^((?<fqdn>[^/]+)/)?(?<ip>[^:]+):(?<port>\d+)$")

We either have a part that ends with / and then fqdn is everything but that last character, or we don't have such a part and then we don't care about / at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions