Store request URI in yet unknown Sones when parsing.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / Core.java
index ccd5aff..b838216 100644 (file)
@@ -310,8 +310,9 @@ public class Core extends AbstractService {
         */
        public void loadSone(String requestUri) {
                try {
-                       FetchResult fetchResult = freenetInterface.fetchUri(new FreenetURI(requestUri).setMetaString(new String[] { "sone.xml" }));
-                       soneDownloader.parseSone(null, fetchResult);
+                       FreenetURI realRequestUri = new FreenetURI(requestUri).setMetaString(new String[] { "sone.xml" });
+                       FetchResult fetchResult = freenetInterface.fetchUri(realRequestUri);
+                       soneDownloader.parseSone(null, fetchResult, realRequestUri);
                } catch (MalformedURLException mue1) {
                        logger.log(Level.INFO, "Could not create URI from “" + requestUri + "”.", mue1);
                }