Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
Signed-off-by: Jan Bartel <janb@webtide.com>
This commit is contained in:
commit
149ac97b6f
|
@ -18,6 +18,7 @@
|
|||
|
||||
package org.eclipse.jetty.osgi.test;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.inject.Inject;
|
||||
|
@ -25,6 +26,8 @@ import javax.inject.Inject;
|
|||
import org.eclipse.jetty.client.HttpClient;
|
||||
import org.eclipse.jetty.client.api.ContentResponse;
|
||||
import org.eclipse.jetty.client.api.Request;
|
||||
import org.eclipse.jetty.client.util.MultiPartContentProvider;
|
||||
import org.eclipse.jetty.client.util.StringContentProvider;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
@ -131,6 +134,11 @@ public class TestJettyOSGiBootWithAnnotations
|
|||
assertEquals("Response status code", HttpStatus.OK_200, response.getStatus());
|
||||
content = response.getContentAsString();
|
||||
TestOSGiUtil.assertContains("Response contents", content, "<h1>FRAGMENT</h1>");
|
||||
MultiPartContentProvider multiPart = new MultiPartContentProvider();
|
||||
multiPart.addFieldPart("field", new StringContentProvider("foo"), null);
|
||||
response = client.newRequest("http://127.0.0.1:" + port + "/multi").method("POST")
|
||||
.content(multiPart).send();
|
||||
assertEquals(HttpStatus.OK_200, response.getStatus());
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
@ -30,10 +30,6 @@ import org.eclipse.jetty.http.MultiPartFormInputStream;
|
|||
import org.eclipse.jetty.server.handler.ContextHandler;
|
||||
import org.eclipse.jetty.server.handler.ContextHandler.Context;
|
||||
|
||||
/*
|
||||
* Used to switch between the old and new implementation of MultiPart Form InputStream Parsing.
|
||||
* The new implementation is preferred will be used as default unless specified otherwise constructor.
|
||||
*/
|
||||
public interface MultiParts extends Closeable
|
||||
{
|
||||
Collection<Part> getParts() throws IOException;
|
||||
|
|
Loading…
Reference in New Issue