[Bug 397111] Tolerate empty or excessive whitespace preceeding MultiParts

This commit is contained in:
Jesse McConnell 2012-12-31 15:52:53 -03:00
parent 1da584003a
commit 455fe8c3b1

View File

@ -148,7 +148,7 @@ public class MultiPartFilter implements Filter
// Get first boundary
String line=((ReadLineInputStream)in).readLine();
if (line == null || line.length() == 0)
if (line == null)
throw new IOException("Missing content for multipart request");
line = line.trim();
@ -164,7 +164,7 @@ public class MultiPartFilter implements Filter
line=(line==null?line:line.trim());
}
if (line == null || line.length() == 0)
if (line == null)
throw new IOException("Missing initial multi part boundary");
// Read each part