vectordotdev/vector · info
a valid HTTP/1 URI is valid as an HTTP URI
Error message
a valid HTTP/1 URI is valid as an HTTP URI
What it means
This panic fires in `protocol_endpoint` when re-parsing an already-valid `hyper::header::Uri` (HTTP/1 flavor) into the `http` crate's `Uri` fails. Both types represent HTTP URIs with the same validity rules, so a URI valid in one is valid in the other; the expect asserts that assumption.
Solutions
- Report as a bug to Vector with the endpoint URI that triggered it.
- Check for mismatched hyper/http crate versions in a custom Vector build.
- Ensure the sink endpoint URL is a plain, well-formed http/https URL in configuration.
Defensive patterns
Strategy: validation
Validate before calling
// Validate endpoint URLs are plain http/https URLs in config. let u = url::Url::parse(endpoint)?; assert!(matches!(u.scheme(), "http" | "https"));
Prevention
- Use simple, well-formed endpoint URLs in sink configuration.
- Avoid exotic URI forms (userinfo, odd schemes) for sink endpoints.
- Keep hyper and http crate versions consistent in custom builds.
When it happens
Trigger: Any request processed by the http_v1 sink's `call` path passes through here; the panic only occurs if the crate-local Uri type accepts a string the `http::Uri` parser rejects (e.g. divergent grammar between crate versions).
Common situations: Could hypothetically appear after a crate version mismatch where hyper and http disagree on URI grammar (e.g. unusual schemes or authority forms).
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- a validated HTTP endpoint is a valid `http 1` URI
- error creating request
- error creating request
- invalid parts
- building HTTP request failed unexpectedly
AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16).
Data as JSON: /api/errors/c2a4e99d0cddfd15.
Report an issue: GitHub.
Appendix: source
Thrown at src/sinks/util/http_v1.rs:189
&response.http_response.body()[..response
.http_response
.body()
.len()
.min(super::http::MAX_ERROR_BODY_BYTES)],
),
);
}
status
},
retry_strategy,
)
}
fn protocol_endpoint(uri: &Uri) -> (String, String) {
let uri = uri
.to_string()
.parse::<http::Uri>()
.expect("a valid HTTP/1 URI is valid as an HTTP URI");
super::uri::protocol_endpoint(uri)
}
View on GitHub (pinned to bdb87aeaa4)