resetContent does not reset Date Header Signed-off-by: gregw <gregw@webtide.com>
This commit is contained in:
parent
96d2977942
commit
cba1fd6930
|
@ -1253,7 +1253,6 @@ public class Response implements HttpServletResponse
|
|||
case LAST_MODIFIED:
|
||||
case EXPIRES:
|
||||
case ETAG:
|
||||
case DATE:
|
||||
case VARY:
|
||||
i.remove();
|
||||
continue;
|
||||
|
|
|
@ -154,6 +154,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);
|
||||
|
|
|
@ -2090,6 +2090,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");
|
||||
|
||||
|
@ -2106,6 +2107,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");
|
||||
|
|
Loading…
Reference in New Issue