Skip to content

Commit

Permalink
another possible fix for
Browse files Browse the repository at this point in the history
  • Loading branch information
Orbiter committed Nov 15, 2023
1 parent d72cd79 commit 4a611ac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/net/yacy/document/parser/sitemapParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

package net.yacy.document.parser;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
Expand All @@ -50,6 +51,7 @@
import net.yacy.document.TextParser;
import net.yacy.document.VocabularyScraper;

import org.apache.commons.io.IOUtils;
import org.w3c.dom.CharacterData;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
Expand Down Expand Up @@ -131,7 +133,9 @@ public static SitemapReader parse(final DigestURL sitemapURL, final ClientIdenti
if ((contentMimeType != null && (contentMimeType.equals("application/x-gzip") || contentMimeType.equals("application/gzip"))) || url.endsWith(".gz")) {
contentStream = new GZIPInputStream(contentStream);
}
return new SitemapReader(contentStream, agent);
byte[] bytes = IOUtils.toByteArray(contentStream);
ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
return new SitemapReader(bais, agent);
} catch (final IOException e) {
throw e;
}
Expand Down

0 comments on commit 4a611ac

Please sign in to comment.