*) bugfix for ArrayIndexOutOfBoundsException in robots-parser (thanks to low012)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3739 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 18 years ago
parent b30e64daab
commit b1680ab71f

@ -110,7 +110,7 @@ public final class robotsParser{
} }
public static Object[] parse(byte[] robotsTxt) throws IOException { public static Object[] parse(byte[] robotsTxt) throws IOException {
if ((robotsTxt == null)||(robotsTxt.length == 0)) return new Object[]{new ArrayList(0),null}; if ((robotsTxt == null)||(robotsTxt.length == 0)) return new Object[]{new ArrayList(0),null,null};
ByteArrayInputStream bin = new ByteArrayInputStream(robotsTxt); ByteArrayInputStream bin = new ByteArrayInputStream(robotsTxt);
BufferedReader reader = new BufferedReader(new InputStreamReader(bin)); BufferedReader reader = new BufferedReader(new InputStreamReader(bin));
return parse(reader); return parse(reader);

Loading…
Cancel
Save