Skip to content

Usage in Vector #6

@spencergilbert

Description

@spencergilbert

Hey, I wanted to reach out with a couple things.

I'm adding a function to our remapping language that leverages your library here - so first off thanks for the library!

I was wondering when the next crate release might be, as we'd prefer to track that rather than a git sha (parsing hosts without "http://" was a large part of the request).

And on the topic of parsing hosts without "http://" I've noticed that depending on the presence of "http://" the inputs from these tests don't actually seem to fail: https://github.com/dovahcrow/tldextract-rs/blob/master/tests/tests.rs#L134-L144

$ .host = "xn--tub-1m9d15sfkkhsifsbqygyujjrw602gk4li5qqk98aca0w.google.com"
"xn--tub-1m9d15sfkkhsifsbqygyujjrw602gk4li5qqk98aca0w.google.com"

$ parsed, err = parse_host(.host)
{ "domain": "google", "subdomain": "亲,您好,异常订单退款链接:tub", "suffix": "com" }

$ .host = "http://xn--tub-1m9d15sfkkhsifsbqygyujjrw602gk4li5qqk98aca0w.google.com"
"http://xn--tub-1m9d15sfkkhsifsbqygyujjrw602gk4li5qqk98aca0w.google.com"

$ parsed, err = parse_host(.host)
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: IdnaError', lib/vrl/stdlib/src/parse_host.rs:98:40

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions