Blame SOURCES/eclipse-patch-out-fileupload-dep.patch

d433ea
--- rt.equinox.bundles/bundles/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF.orig	2019-05-30 16:37:50.444183989 +0100
d433ea
+++ rt.equinox.bundles/bundles/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF	2019-05-30 16:39:53.635849673 +0100
d433ea
@@ -11,10 +11,7 @@
d433ea
  org.eclipse.equinox.http.servlet.context;version="1.0.0";x-internal:=true,
d433ea
  org.eclipse.equinox.http.servlet.session;version="1.0.0";x-internal:=true,
d433ea
  org.eclipse.equinox.http.servlet.dto;version="1.0.0";x-internal:=true
d433ea
-Import-Package: org.apache.commons.fileupload;version="[1.2.2, 2.0.0)";resolution:=optional,
d433ea
- org.apache.commons.fileupload.disk;version="[1.2.2, 2.0.0)";resolution:=optional,
d433ea
- org.apache.commons.fileupload.servlet;version="[1.2.2, 2.0.0)";resolution:=optional,
d433ea
- javax.servlet;version="[3.1.0,5.0.0)",
d433ea
+Import-Package: javax.servlet;version="[3.1.0,5.0.0)",
d433ea
  javax.servlet.annotation;version="[3.1.0,5.0.0)";resolution:=optional,
d433ea
  javax.servlet.descriptor;version="[3.1.0,5.0.0)";resolution:=optional,
d433ea
  javax.servlet.http;version="[3.1.0,5.0.0)",
d433ea
--- rt.equinox.bundles/bundles/org.eclipse.equinox.http.servlet.tests/META-INF/MANIFEST.MF.orig	2019-05-30 16:55:25.117321897 +0100
d433ea
+++ rt.equinox.bundles/bundles/org.eclipse.equinox.http.servlet.tests/META-INF/MANIFEST.MF	2019-05-30 16:55:36.792290214 +0100
d433ea
@@ -8,9 +8,6 @@
d433ea
 Require-Bundle: org.junit;bundle-version="4.0"
d433ea
 Import-Package: javax.servlet;version="2.6.0",
d433ea
  javax.servlet.http;version="2.6.0",
d433ea
- org.apache.commons.fileupload;version="1.2.2",
d433ea
- org.apache.commons.fileupload.disk;version="1.2.2",
d433ea
- org.apache.commons.fileupload.servlet;version="1.2.2",
d433ea
  org.eclipse.equinox.http.jetty;version="1.4.0",
d433ea
  org.eclipse.equinox.http.servlet;version="1.1.0",
d433ea
  org.eclipse.equinox.http.servlet.context;version="1.0.0",
d433ea
--- eclipse.platform.releng/features/org.eclipse.sdk.tests/feature.xml.orig	2019-06-20 11:07:22.539088841 +0100
d433ea
+++ eclipse.platform.releng/features/org.eclipse.sdk.tests/feature.xml	2019-06-20 11:07:27.679071742 +0100
d433ea
@@ -20,7 +20,6 @@
d433ea
    </license>
d433ea
 
d433ea
    <requires>
d433ea
-      <import plugin="org.apache.commons.fileupload" />
d433ea
       <import plugin="org.apache.commons.io" />
d433ea
       <import plugin="org.hamcrest.core" />
d433ea
       <import plugin="org.hamcrest.library" />
d433ea
--- rt.equinox.bundles/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java.orig	2019-06-20 11:48:48.317887414 +0100
d433ea
+++ rt.equinox.bundles/bundles/org.eclipse.equinox.http.servlet.tests/src/org/eclipse/equinox/http/servlet/tests/ServletTest.java	2019-06-20 11:49:35.106774459 +0100
d433ea
@@ -79,10 +79,6 @@
d433ea
 import javax.servlet.http.HttpSessionListener;
d433ea
 import javax.servlet.http.Part;
d433ea
 
d433ea
-import org.apache.commons.fileupload.FileItem;
d433ea
-import org.apache.commons.fileupload.FileUploadException;
d433ea
-import org.apache.commons.fileupload.disk.DiskFileItemFactory;
d433ea
-import org.apache.commons.fileupload.servlet.ServletFileUpload;
d433ea
 import org.eclipse.equinox.http.servlet.ExtendedHttpService;
d433ea
 import org.eclipse.equinox.http.servlet.RangeAwareServletContextHelper;
d433ea
 import org.eclipse.equinox.http.servlet.context.ContextPathCustomizer;
c90b3b
@@ -2657,66 +2653,6 @@
d433ea
 	}
d433ea
 
c90b3b
 	@Test
d433ea
-	public void test_commonsFileUpload() throws Exception {
d433ea
-		Servlet servlet = new HttpServlet() {
d433ea
-			private static final long serialVersionUID = 1L;
d433ea
-
d433ea
-			@Override
d433ea
-			protected void doPost(HttpServletRequest req, HttpServletResponse resp)
c90b3b
-				throws IOException {
d433ea
-
d433ea
-				boolean isMultipart = ServletFileUpload.isMultipartContent(req);
d433ea
-				Assert.assertTrue(isMultipart);
d433ea
-
d433ea
-				DiskFileItemFactory factory = new DiskFileItemFactory();
d433ea
-
d433ea
-				ServletContext servletContext = this.getServletConfig().getServletContext();
d433ea
-				File repository = (File) servletContext.getAttribute("javax.servlet.context.tempdir");
d433ea
-				factory.setRepository(repository);
d433ea
-				ServletFileUpload upload = new ServletFileUpload(factory);
d433ea
-
d433ea
-				List<FileItem> items = null;
d433ea
-				try {
d433ea
-					List<FileItem> parseRequest = upload.parseRequest(req);
d433ea
-					items = parseRequest;
d433ea
-				} catch (FileUploadException e) {
d433ea
-					e.printStackTrace();
d433ea
-				}
d433ea
-
d433ea
-				Assert.assertNotNull(items);
d433ea
-				Assert.assertFalse(items.isEmpty());
d433ea
-
d433ea
-				FileItem fileItem = items.get(0);
d433ea
-
d433ea
-				String submittedFileName = fileItem.getName();
d433ea
-				String contentType = fileItem.getContentType();
d433ea
-				long size = fileItem.getSize();
d433ea
-
d433ea
-				PrintWriter writer = resp.getWriter();
d433ea
-
d433ea
-				writer.write(submittedFileName);
d433ea
-				writer.write("|");
d433ea
-				writer.write(contentType);
d433ea
-				writer.write("|" + size);
d433ea
-			}
d433ea
-		};
d433ea
-
c90b3b
-		Dictionary<String, Object> props = new Hashtable<>();
d433ea
-		props.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_NAME, "S16");
d433ea
-		props.put(HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN, "/Servlet16/*");
d433ea
-		registrations.add(getBundleContext().registerService(Servlet.class, servlet, props));
d433ea
-
c90b3b
-		Map<String, List<Object>> map = new HashMap<>();
d433ea
-
d433ea
-		map.put("file", Arrays.<Object>asList(getClass().getResource("blue.png")));
d433ea
-
d433ea
-		Map<String, List<String>> result = requestAdvisor.upload("Servlet16/do", map);
d433ea
-
d433ea
-		Assert.assertEquals("200", result.get("responseCode").get(0));
d433ea
-		Assert.assertEquals("blue.png|image/png|292", result.get("responseBody").get(0));
d433ea
-	}
c90b3b
-
c90b3b
-	@Test
d433ea
 	public void test_PathEncodings_Bug540970() throws Exception {
c90b3b
 		Servlet servlet = new HttpServlet() {
c90b3b
 			private static final long serialVersionUID = 1L;