From: David ‘Bombe’ Roden Date: Wed, 17 Nov 2010 12:45:08 +0000 (+0100) Subject: Convert the URI a Sone was downloaded from to USK before setting it. X-Git-Tag: 0.3-RC1~33 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=5c5ef0964da82ea0f677ea0e7f24901f8e31af88;p=Sone.git Convert the URI a Sone was downloaded from to USK before setting it. --- diff --git a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java index 42f6702..2310aca 100644 --- a/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java +++ b/src/main/java/net/pterodactylus/sone/core/SoneDownloader.java @@ -155,7 +155,11 @@ public class SoneDownloader extends AbstractService { soneInputStream = soneBucket.getInputStream(); Sone parsedSone = parseSone(originalSone, soneInputStream); if (parsedSone != null) { - parsedSone.setRequestUri(requestUri.setMetaString(new String[0])); + if (requestUri.getKeyType().equals("USK")) { + parsedSone.setRequestUri(requestUri.setMetaString(new String[0])); + } else { + parsedSone.setRequestUri(requestUri.setKeyType("USK").setDocName("Sone").setMetaString(new String[0])); + } } return parsedSone; } catch (IOException ioe1) {