tinyhumansai/openhuman · error

IPv6 hosts are not supported in http_request

Error message

IPv6 hosts are not supported in http_request

What it means

The host begins with '[', indicating a bracketed IPv6 literal, which this URL parser explicitly does not support for http_request; the request is refused rather than mis-parsed.

Source

Thrown at src/openhuman/tools/impl/network/url_guard.rs:240

        .strip_prefix("http://")
        .or_else(|| url.strip_prefix("https://"))
        .ok_or_else(|| anyhow::anyhow!("Only http:// and https:// URLs are allowed"))?;

    let authority = rest
        .split(['/', '?', '#'])
        .next()
        .ok_or_else(|| anyhow::anyhow!("Invalid URL"))?;

    if authority.is_empty() {
        anyhow::bail!("URL must include a host");
    }

    if authority.contains('@') {
        anyhow::bail!("URL userinfo is not allowed");
    }

    if authority.starts_with('[') {
        anyhow::bail!("IPv6 hosts are not supported in http_request");
    }

    let host = authority
        .split(':')
        .next()
        .unwrap_or_default()
        .trim()
        .trim_end_matches('.')
        .to_lowercase();

    if host.is_empty() {
        anyhow::bail!("URL must include a valid host");
    }

    Ok(host)
}

fn extract_port(url: &str) -> anyhow::Result<u16> {

View on GitHub (pinned to 7491200858)

Solutions

  1. Use the host's DNS name instead of a raw IPv6 address
  2. Use an IPv4 or hostname endpoint
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/tools/impl/network/url_guard.rs:240 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/1eabcb6d87f5b57e. Report an issue: GitHub.