X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2FCache.java;h=0166a37d1689fa6152ec7a451bf568071809302b;hb=9252c65e13ceb952626da9e1f9e6d5caef42733e;hp=75a0f5d52e2c194a8d7b614b005387c38a088824;hpb=08fe2e33007063e30fe22dc1d290f8afaa18eb1d;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/Cache.java b/src/be/nikiroo/fanfix/Cache.java index 75a0f5d..0166a37 100644 --- a/src/be/nikiroo/fanfix/Cache.java +++ b/src/be/nikiroo/fanfix/Cache.java @@ -15,7 +15,6 @@ import java.net.HttpURLConnection; import java.net.URISyntaxException; import java.net.URL; import java.net.URLConnection; -import java.nio.file.FileAlreadyExistsException; import java.util.Date; import java.util.Map; import java.util.zip.GZIPInputStream; @@ -228,7 +227,7 @@ public class Cache { * @param uniqueID * a unique ID for this resource * - * @return the resulting {@link FileAlreadyExistsException} + * @return the resulting {@link File} * * @throws IOException * in case of I/O error @@ -302,7 +301,7 @@ public class Cache { conn.setRequestProperty("User-Agent", UA); conn.setRequestProperty("Cookie", generateCookies(support)); conn.setRequestProperty("Accept-Encoding", "gzip"); - if (support != null) { + if (support != null && support.getCurrentReferer() != null) { conn.setRequestProperty("Referer", support.getCurrentReferer() .toString()); conn.setRequestProperty("Host", support.getCurrentReferer()