mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 11:42:23 -05:00
Fix DoubleDotInputStream
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1734 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
876deaf969
commit
921070b3d1
@ -67,11 +67,8 @@ public class DoubleDotInputStream extends PushbackInputStream {
|
|||||||
}
|
}
|
||||||
// \r\n..
|
// \r\n..
|
||||||
} else if (buffer[index] == '.') {
|
} else if (buffer[index] == '.') {
|
||||||
// \r\n..\r
|
|
||||||
if ((readNextByte()) == '\r') {
|
|
||||||
// replace double dot
|
// replace double dot
|
||||||
buffer[--index] = '\r';
|
index--;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ public class TestDoubleDotInputStream extends TestCase {
|
|||||||
|
|
||||||
public void testAnotherTest() throws IOException {
|
public void testAnotherTest() throws IOException {
|
||||||
String value = "foo\r\n..bar";
|
String value = "foo\r\n..bar";
|
||||||
assertEquals(value, doubleDotRead(value));
|
assertEquals(value.replaceAll("\\.\\.", "."), doubleDotRead(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user