{"record":{"id":"4f67e4a1ba2a808f","repo":"projectdiscovery/nuclei","slug":"malformed-request-specified-v","errorCode":null,"errorMessage":"malformed request specified: %v","messagePattern":"malformed request specified: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/protocols/http/raw/raw.go","lineNumber":224,"sourceCode":"\t\treturn nil, fmt.Errorf(\"could not read request: %w\", err)\n\t}\n\t// ignore all annotations\n\tif stringsutil.HasPrefixAny(s, \"@\") {\n\t\tgoto read_line\n\t}\n\n\tparts := strings.Fields(s)\n\tif len(parts) > 0 {\n\t\trawRequest.Method = parts[0]\n\t\tif len(parts) == 2 && strings.Contains(parts[1], \"HTTP\") {\n\t\t\t// When relative path is missing/ not specified it is considered that\n\t\t\t// request is meant to be untampered at path\n\t\t\t// Ex: GET HTTP/1.1\n\t\t\tparts = []string{parts[0], \"\", parts[1]}\n\t\t}\n\t\tif len(parts) < 3 && !unsafe {\n\t\t\t// missing a field\n\t\t\treturn nil, fmt.Errorf(\"malformed request specified: %v\", s)\n\t\t}\n\n\t\t// relative path\n\t\trawRequest.Path = parts[1]\n\t\t// Note: raw request does not URL Encode if needed `+` should be used\n\t\t// this can be also be implemented\n\t}\n\n\tvar multiPartRequest bool\n\t// Accepts all malformed headers\n\tvar key, value string\n\tfor {\n\t\tline, readErr := reader.ReadString('\\n')\n\t\tline = strings.TrimSpace(line)\n\n\t\tif readErr != nil || line == \"\" {\n\t\t\tif readErr != io.EOF {\n\t\t\t\tbreak","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/protocols/http/raw/raw.go#L206-L242","documentation":"Error \"malformed request specified: %v\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/protocols/http/raw/raw.go:224 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"265b3a3dec374741614e342f813c10f8b38d2bb7","analyzedAt":"2026-08-15T20:05:51.855Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}