mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Handle 301 better.
This commit is contained in:
parent
79e7f7b397
commit
4919b19196
2 changed files with 8 additions and 2 deletions
|
@ -66,7 +66,7 @@ class Kurl(val hostInfo: HostConfig) {
|
|||
if (connection is HttpURLConnection) {
|
||||
val responseCode = (connection as HttpURLConnection).responseCode
|
||||
checkResponseCode(responseCode)
|
||||
responseCode == 200
|
||||
responseCode == 200 || responseCode == 301
|
||||
} else if (url.startsWith(FileDependency.PREFIX_FILE)) {
|
||||
val fileName = url.substring(FileDependency.PREFIX_FILE.length)
|
||||
File(fileName).exists()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue