| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f28198c commit 9b5b8d7
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -148,7 +148,9 @@ function fetchWithRedirects(parsed) { | |||
| 148 | 148 | err.message = `Cannot find module '${parsed.href}', HTTP 404`; | |
| 149 | 149 | throw err; | |
| 150 | 150 | } | |
| 151 | - if (res.statusCode < 200 || res.statusCode >= 400) { | ||
| 151 | + // This condition catches all unsupported status codes, including | ||
| 152 | + // 3xx redirection codes without `Location` HTTP header. | ||
| 153 | + if (res.statusCode < 200 || res.statusCode >= 300) { | ||
| 152 | 154 | throw new ERR_NETWORK_IMPORT_DISALLOWED( | |
| 153 | 155 | res.headers.location, | |
| 154 | 156 | parsed.href, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments