{"record":{"id":"1c38b58984956810","repo":"oven-sh/bun","slug":"unsupportedredirectprotocol","errorCode":null,"errorMessage":"UnsupportedRedirectProtocol","messagePattern":"UnsupportedRedirectProtocol","errorType":"exception","errorClass":"bun_http::Error","httpStatus":null,"severity":"error","filePath":"src/http/error.rs","lineNumber":66,"sourceCode":"    #[error(\"TooManyRedirects\")]\n    TooManyRedirects,\n    #[error(\"HTTP3Unsupported\")]\n    HTTP3Unsupported,\n    #[error(\"ResponseHeadersTooLarge\")]\n    ResponseHeadersTooLarge,\n    #[error(\"UnrequestedUpgrade\")]\n    UnrequestedUpgrade,\n    #[error(\"UnexpectedData\")]\n    UnexpectedData,\n    #[error(\"InvalidHTTPResponse\")]\n    InvalidHTTPResponse,\n    #[error(\"InvalidContentLength\")]\n    InvalidContentLength,\n    #[error(\"UnsupportedTransferEncoding\")]\n    UnsupportedTransferEncoding,\n    #[error(\"RequestBodyNotReusable\")]\n    RequestBodyNotReusable,\n    #[error(\"UnsupportedRedirectProtocol\")]\n    UnsupportedRedirectProtocol,\n    #[error(\"RedirectURLTooLong\")]\n    RedirectURLTooLong,\n    #[error(\"RedirectURLInvalid\")]\n    RedirectURLInvalid,\n    #[error(\"InvalidRedirectURL\")]\n    InvalidRedirectURL,\n    #[error(\"UnexpectedRedirect\")]\n    UnexpectedRedirect,\n    #[error(\"ShortRead\")]\n    ShortRead,\n    #[error(\"WantRead\")]\n    WantRead,\n    #[error(\"WantWrite\")]\n    WantWrite,\n    #[error(\"HTTP3HandshakeFailed\")]\n    HTTP3HandshakeFailed,\n    #[error(\"HTTP3ProtocolError\")]","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/oven-sh/bun/blob/8c5296ac459e8252d3cd702f3fbcbb0c249d95d5/src/http/error.rs#L48-L84","documentation":"A redirect Location header points to a URL with a protocol the client does not support for redirects (e.g., ftp://, file://, or other non-HTTP(S) schemes). Only http and https redirect targets are accepted.","triggerScenarios":"Thrown at src/http/error.rs:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the server redirect to use http:// or https:// URLs","Handle the redirect manually if a non-HTTP protocol target is actually intended","Check for open-redirect vulnerabilities being exploited by crafted Location headers"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c5296ac459e8252d3cd702f3fbcbb0c249d95d5","analyzedAt":"2026-08-16T08:01:58.794Z","contentChangedAt":"2026-08-16T08:01:58.794Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}