{"record":{"id":"be03b4630e9a6eee","repo":"epi052/feroxbuster","slug":"invalid-request-missing-request-line-uri","errorCode":null,"errorMessage":"Invalid request: Missing request line URI","messagePattern":"Invalid request: Missing request line URI","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/config/utils.rs","lineNumber":506,"sourceCode":"\n    let mut request_parts = request_line.split_whitespace();\n\n    let Some(method) = request_parts.next() else {\n        bail!(\"Invalid request: Missing method\");\n    };\n\n    if method.is_empty() {\n        bail!(\"Invalid request: Empty method\");\n    }\n\n    let method = method.to_string();\n\n    if !config.methods.contains(&method) {\n        config.methods.push(method);\n    }\n\n    let Some(uri) = request_parts.next() else {\n        bail!(\"Invalid request: Missing request line URI\");\n    };\n\n    if uri.is_empty() {\n        bail!(\"Invalid request: Empty request line URI\");\n    }\n\n    for mut line in head_parts {\n        line = line.trim_matches('\\r').trim();\n\n        if line.is_empty() {\n            break; // Empty line signals the end of headers\n        }\n\n        let Ok((name, value)) = split_header(line) else {\n            log::warn!(\"Invalid header: {line}\");\n            continue;\n        };\n","sourceCodeStart":488,"sourceCodeEnd":524,"githubUrl":"https://github.com/epi052/feroxbuster/blob/1f595dab5c76858d5a14fbc47dabf2563d729c62/src/config/utils.rs#L488-L524","documentation":"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.","triggerScenarios":"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.","commonSituations":"Hand-edited request captures missing the path; copying a request line and truncating it; mis-pasted single-line requests from documentation.","solutions":["Add a URI to the request line, e.g. change 'GET' to 'GET / HTTP/1.1'","Verify the first line has three whitespace-separated tokens: METHOD URI VERSION","Re-export the raw request from the original tool to ensure the request line is intact"],"exampleFix":"// before\n\"GET\\nHost: site.com\"\n// after\n\"GET / HTTP/1.1\\nHost: site.com\"","handlingStrategy":"validation","validationCode":"fn request_line_has_uri(raw: &str) -> Result<(), String> {\n    let line = raw.lines().next().unwrap_or(\"\");\n    let parts: Vec<&str> = line.split_whitespace().collect();\n    if parts.len() < 2 {\n        return Err(\"request line must be 'METHOD URI [VERSION]'\".into());\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Include at least 'GET / HTTP/1.1' on the first line of every request file","Never truncate the request line when copying from docs or tools","Validate with a split-whitespace check before use"],"tags":["http","request-parsing","config"],"backgroundTag":"missing-required-argument","analyzedSha":"1f595dab5c76858d5a14fbc47dabf2563d729c62","analyzedAt":"2026-09-13T19:33:06.208Z","contentChangedAt":"2026-09-13T19:33:06.208Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}