From 455fe8c3b1cc94b5f124d15e7614c99fdb237d24 Mon Sep 17 00:00:00 2001 From: Jesse McConnell Date: Mon, 31 Dec 2012 15:52:53 -0300 Subject: [PATCH] [Bug 397111] Tolerate empty or excessive whitespace preceeding MultiParts --- .../main/java/org/eclipse/jetty/servlets/MultiPartFilter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/MultiPartFilter.java b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/MultiPartFilter.java index e37ffef6c59..403443a84ee 100644 --- a/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/MultiPartFilter.java +++ b/jetty-servlets/src/main/java/org/eclipse/jetty/servlets/MultiPartFilter.java @@ -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