[Bug 397111] Tolerate empty or excessive whitespace preceeding MultiParts

This commit is contained in:
Jesse McConnell 2012-12-31 15:57:28 -03:00
commit c1e5b0b80c
1 changed files with 2 additions and 3 deletions

View File

@ -482,7 +482,7 @@ public class MultiPartInputStream
// 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");
boolean badFormatLogged = false;
@ -498,10 +498,9 @@ public class MultiPartInputStream
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
boolean lastPart=false;
String contentDisposition=null;