epi052/feroxbuster · error

Invalid request: Missing request line URI

Error message

Invalid request: Missing request line URI

What it means

Thrown by parse_request_file when the request line has a method but no URI token — request_parts.next() returns None after consuming the method. A raw HTTP request needs METHOD URI on the first line; without the URI there is nothing to target.

Solutions

  1. Add a URI to the request line, e.g. change 'GET' to 'GET / HTTP/1.1'
  2. Verify the first line has three whitespace-separated tokens: METHOD URI VERSION
  3. Re-export the raw request from the original tool to ensure the request line is intact

Example fix

// before
"GET\nHost: site.com"
// after
"GET / HTTP/1.1\nHost: site.com"
Defensive patterns

Strategy: validation

Validate before calling

fn request_line_has_uri(raw: &str) -> Result<(), String> {
    let line = raw.lines().next().unwrap_or("");
    let parts: Vec<&str> = line.split_whitespace().collect();
    if parts.len() < 2 {
        return Err("request line must be 'METHOD URI [VERSION]'".into());
    }
    Ok(())
}

Prevention

When it happens

Trigger: A request file whose first line contains only the method, e.g. 'GET' alone, or 'GET HTTP/1.1' where splitting on whitespace yields only method and version with no URI in between.

Common situations: Hand-edited request captures missing the path; copying a request line and truncating it; mis-pasted single-line requests from documentation.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


AI-assisted analysis of epi052/feroxbuster@1f595dab5c (2026-09-13). Data as JSON: /api/errors/be03b4630e9a6eee. Report an issue: GitHub.

Appendix: source

Thrown at src/config/utils.rs:506

    let mut request_parts = request_line.split_whitespace();

    let Some(method) = request_parts.next() else {
        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;
        };

View on GitHub (pinned to 1f595dab5c)