{"record":{"id":"1eabcb6d87f5b57e","repo":"tinyhumansai/openhuman","slug":"ipv6-hosts-are-not-supported-in-http-request","errorCode":null,"errorMessage":"IPv6 hosts are not supported in http_request","messagePattern":"IPv6 hosts are not supported in http_request","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/tools/impl/network/url_guard.rs","lineNumber":240,"sourceCode":"        .strip_prefix(\"http://\")\n        .or_else(|| url.strip_prefix(\"https://\"))\n        .ok_or_else(|| anyhow::anyhow!(\"Only http:// and https:// URLs are allowed\"))?;\n\n    let authority = rest\n        .split(['/', '?', '#'])\n        .next()\n        .ok_or_else(|| anyhow::anyhow!(\"Invalid URL\"))?;\n\n    if authority.is_empty() {\n        anyhow::bail!(\"URL must include a host\");\n    }\n\n    if authority.contains('@') {\n        anyhow::bail!(\"URL userinfo is not allowed\");\n    }\n\n    if authority.starts_with('[') {\n        anyhow::bail!(\"IPv6 hosts are not supported in http_request\");\n    }\n\n    let host = authority\n        .split(':')\n        .next()\n        .unwrap_or_default()\n        .trim()\n        .trim_end_matches('.')\n        .to_lowercase();\n\n    if host.is_empty() {\n        anyhow::bail!(\"URL must include a valid host\");\n    }\n\n    Ok(host)\n}\n\nfn extract_port(url: &str) -> anyhow::Result<u16> {","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/tools/impl/network/url_guard.rs#L222-L258","documentation":"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.","triggerScenarios":"Thrown at src/openhuman/tools/impl/network/url_guard.rs:240 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the host's DNS name instead of a raw IPv6 address","Use an IPv4 or hostname endpoint"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}