{"record":{"id":"15ae248b2f3c000c","repo":"projectdiscovery/nuclei","slug":"could-not-parse-request-url-w","errorCode":null,"errorMessage":"could not parse request URL: %w","messagePattern":"could not parse request URL: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/protocols/http/build_request.go","lineNumber":351,"sourceCode":"\t\t}\n\n\t\t// ignore all annotations\n\t\tif stringsutil.HasPrefixAny(s, \"@\") {\n\t\t\tgoto read_line\n\t\t}\n\n\t\tparts := strings.Split(s, \" \")\n\t\tif len(parts) < 3 {\n\t\t\treturn nil, fmt.Errorf(\"malformed request supplied\")\n\t\t}\n\n\t\tif err := expressions.ContainsUnresolvedVariables(parts[1]); err != nil && !r.request.SkipVariablesCheck {\n\t\t\treturn nil, errkit.Newf(\"unresolved variables `%v` found in request\", parts[1])\n\t\t}\n\n\t\tparsed, err := urlutil.ParseURL(parts[1], true)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"could not parse request URL: %w\", err)\n\t\t}\n\t\t// self-contained requests choose their own destination URL, so validate\n\t\t// that host against the network policy.\n\t\tif err := r.validateSelfContainedHost(parsed.Hostname()); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tvalues = generators.MergeMaps(\n\t\t\tgenerators.MergeMaps(dynamicValues, protocolutils.GenerateVariables(parsed, false, nil)),\n\t\t\tvalues,\n\t\t)\n\n\t\t// Evaluate (replace) variable with final values\n\t\tdata, err = r.renderText(data, values)\n\t\tif err != nil {\n\t\t\treturn nil, errkit.Wrap(err, \"could not evaluate helper expressions\")\n\t\t}\n\n\t\treturn r.generateRawRequest(ctx, data, parsed, values, payloads)","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/projectdiscovery/nuclei/blob/265b3a3dec374741614e342f813c10f8b38d2bb7/pkg/protocols/http/build_request.go#L333-L369","documentation":"Error \"could not parse request URL: %w\" thrown in projectdiscovery/nuclei.","triggerScenarios":"Thrown at pkg/protocols/http/build_request.go:351 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-15T22:17:37.221Z"}