1
0
Fork 0
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:
Cedric Beust 2016-02-09 22:52:39 +04:00
parent 79e7f7b397
commit 4919b19196
2 changed files with 8 additions and 2 deletions

View file

@ -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()