[Bug 397111] Tolerate empty or excessive whitespace preceeding MultiParts
This commit is contained in:
commit
c1e5b0b80c
|
@ -482,7 +482,7 @@ public class MultiPartInputStream
|
||||||
// Get first boundary
|
// Get first boundary
|
||||||
String line=((ReadLineInputStream)_in).readLine();
|
String line=((ReadLineInputStream)_in).readLine();
|
||||||
|
|
||||||
if (line == null || line.length() == 0)
|
if (line == null)
|
||||||
throw new IOException("Missing content for multipart request");
|
throw new IOException("Missing content for multipart request");
|
||||||
|
|
||||||
boolean badFormatLogged = false;
|
boolean badFormatLogged = false;
|
||||||
|
@ -498,10 +498,9 @@ public class MultiPartInputStream
|
||||||
line=(line==null?line:line.trim());
|
line=(line==null?line:line.trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (line == null || line.length() == 0)
|
if (line == null)
|
||||||
throw new IOException("Missing initial multi part boundary");
|
throw new IOException("Missing initial multi part boundary");
|
||||||
|
|
||||||
|
|
||||||
// Read each part
|
// Read each part
|
||||||
boolean lastPart=false;
|
boolean lastPart=false;
|
||||||
String contentDisposition=null;
|
String contentDisposition=null;
|
||||||
|
|
Loading…
Reference in New Issue