Merge branch 'jetty-9.4.x' into jetty-10.0.x
This commit is contained in:
commit
4db5b38956
|
@ -237,7 +237,8 @@ public class MultiPartFormInputStream
|
||||||
@Override
|
@Override
|
||||||
public Collection<String> getHeaders(String name)
|
public Collection<String> getHeaders(String name)
|
||||||
{
|
{
|
||||||
return _headers.getValues(name);
|
Collection<String> headers = _headers.getValues(name);
|
||||||
|
return headers == null ? Collections.emptyList():headers;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -167,6 +167,7 @@ ustar=application/x-ustar
|
||||||
vcd=application/x-cdlink
|
vcd=application/x-cdlink
|
||||||
vrml=model/vrml
|
vrml=model/vrml
|
||||||
vxml=application/voicexml+xml
|
vxml=application/voicexml+xml
|
||||||
|
wasm=application/wasm
|
||||||
wav=audio/x-wav
|
wav=audio/x-wav
|
||||||
wbmp=image/vnd.wap.wbmp
|
wbmp=image/vnd.wap.wbmp
|
||||||
wml=text/vnd.wap.wml
|
wml=text/vnd.wap.wml
|
||||||
|
|
|
@ -786,6 +786,8 @@ public class MultiPartFormInputStreamTest
|
||||||
assertThat(stuff.getContentType(), is("text/plain"));
|
assertThat(stuff.getContentType(), is("text/plain"));
|
||||||
assertThat(stuff.getHeader("Content-Type"), is("text/plain"));
|
assertThat(stuff.getHeader("Content-Type"), is("text/plain"));
|
||||||
assertThat(stuff.getHeaders("content-type").size(), is(1));
|
assertThat(stuff.getHeaders("content-type").size(), is(1));
|
||||||
|
assertNotNull(stuff.getHeaders("non existing part"));
|
||||||
|
assertThat(stuff.getHeaders("non existing part").size(), is(0));
|
||||||
assertThat(stuff.getHeader("content-disposition"), is("form-data; name=\"stuff\"; filename=\"" + filename + "\""));
|
assertThat(stuff.getHeader("content-disposition"), is("form-data; name=\"stuff\"; filename=\"" + filename + "\""));
|
||||||
assertThat(stuff.getHeaderNames().size(), is(2));
|
assertThat(stuff.getHeaderNames().size(), is(2));
|
||||||
assertThat(stuff.getSize(), is(51L));
|
assertThat(stuff.getSize(), is(51L));
|
||||||
|
|
Loading…
Reference in New Issue