epi052/feroxbuster · error
Invalid request: Empty request line URI
Error message
Invalid request: Empty request line URI
What it means
Thrown by parse_request_file when the URI token on the request line is present but empty. After the method is read, the next token is checked; an empty string here means the request line is malformed (e.g. trailing space with no path).
Solutions
- Ensure a non-empty path follows the method on the first line (at minimum '/')
- Normalize the request line with a single space between METHOD, URI and VERSION (e.g. tr -s ' ' on the first line)
- Check for invisible characters (tabs/CR) that consume the URI token; strip or rewrite the first line
Example fix
// before "GET HTTP/1.1" // after "GET / HTTP/1.1"
Defensive patterns
Strategy: validation
Validate before calling
fn request_line_uri_nonempty(raw: &str) -> Result<(), String> {
let line = raw.lines().next().unwrap_or("");
let parts: Vec<&str> = line.split_whitespace().collect();
if parts.len() >= 2 && !parts[1].is_empty() {
Ok(())
} else {
Err("request line URI token missing or empty".into())
}
} Prevention
- Normalize whitespace in the request line (single spaces, no tabs)
- Use an editor that trims trailing spaces, or run sed to clean the file
- Always include an explicit path ('/') in generated requests
When it happens
Trigger: A request line like 'GET HTTP/1.1' with double spaces or a method followed by trailing whitespace, so uri.is_empty() evaluates true after whitespace splitting.
Common situations: Files edited in editors that preserve trailing spaces; requests reconstructed by concatenation scripts that drop the path; template request files with an unfilled URI placeholder.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- Invalid request: Empty method
- Invalid request: Missing request line URI
- Invalid request: Missing Host header and request line URI…
- Invalid request: Could not parse target URL
- JSON has no tag_name
AI-assisted analysis of epi052/feroxbuster@1f595dab5c (2026-09-13).
Data as JSON: /api/errors/fd8ff9286a57d1ee.
Report an issue: GitHub.
Appendix: source
Thrown at src/config/utils.rs:510
bail!("Invalid request: Missing method");
};
if method.is_empty() {
bail!("Invalid request: Empty method");
}
let method = method.to_string();
if !config.methods.contains(&method) {
config.methods.push(method);
}
let Some(uri) = request_parts.next() else {
bail!("Invalid request: Missing request line URI");
};
if uri.is_empty() {
bail!("Invalid request: Empty request line URI");
}
for mut line in head_parts {
line = line.trim_matches('\r').trim();
if line.is_empty() {
break; // Empty line signals the end of headers
}
let Ok((name, value)) = split_header(line) else {
log::warn!("Invalid header: {line}");
continue;
};
if name.is_empty() {
log::warn!("Invalid header name: {line}");
continue;
}View on GitHub (pinned to 1f595dab5c)