added check for final '\n' in crLF case. Relates to github
@@ -280,7 +280,11 @@ private boolean parseHeaders()
if (crLf)
{
- in.read(); // skip last \n
+ int nl = in.read(); // skip last \n
+ if (nl != '\n')
+ {
+ throw new IOException("inconsistent line endings in headers");
+ }
}
}
