Merge remote-tracking branch 'origin/jetty-11.0.x' into jetty-12.0.x

This commit is contained in:
gregw 2023-04-29 13:37:16 +02:00
commit 063a3337d9
3 changed files with 3 additions and 1 deletions

View File

@ -153,6 +153,7 @@ public class ErrorHandlerTest
assertThat("Response status code", response.getStatus(), is(404));
assertThat("Response Content-Length", response.getField(HttpHeader.CONTENT_LENGTH).getIntValue(), greaterThan(0));
assertThat("Response Content-Type", response.get(HttpHeader.CONTENT_TYPE), containsString("text/html;charset=ISO-8859-1"));
assertThat(response.get(HttpHeader.DATE), notNullValue());
assertThat(response.getContent(), containsString("content=\"text/html;charset=ISO-8859-1\""));
assertContent(response);

View File

@ -1217,7 +1217,6 @@ public class Response implements HttpServletResponse
case LAST_MODIFIED:
case EXPIRES:
case ETAG:
case DATE:
case VARY:
i.remove();
continue;

View File

@ -2052,6 +2052,7 @@ public class ResponseTest
response.setContentType("some/type");
response.setContentLength(3);
response.setHeader(HttpHeader.EXPIRES, "never");
response.setHeader(HttpHeader.DATE, "2000-01-01");
response.setHeader("SomeHeader", "SomeValue");
@ -2068,6 +2069,7 @@ public class ResponseTest
// check arbitrary header still set
assertThat(response.getHeader("SomeHeader"), is("SomeValue"));
assertThat(response.getHeader("Date"), is("2000-01-01"));
// check cookies are still there
Enumeration<String> set = response.getHttpFields().getValues("Set-Cookie");