Improve Content-Length exception message

In case ShallowEtagHeaderFilter is not used, the message was confusing
master
Dennis Kieselhorst 9 years ago committed by Brian Clozel
parent cdda839426
commit 554bf4958d
  1. 2
      spring-web/src/main/java/org/springframework/web/util/ContentCachingResponseWrapper.java

@ -138,7 +138,7 @@ public class ContentCachingResponseWrapper extends HttpServletResponseWrapper {
// Overrides Servlet 3.1 setContentLengthLong(long) at runtime // Overrides Servlet 3.1 setContentLengthLong(long) at runtime
public void setContentLengthLong(long len) { public void setContentLengthLong(long len) {
if (len > Integer.MAX_VALUE) { if (len > Integer.MAX_VALUE) {
throw new IllegalArgumentException("Content-Length exceeds ShallowEtagHeaderFilter's maximum (" + throw new IllegalArgumentException("Content-Length exceeds ContentCachingResponseWrapper's maximum (" +
Integer.MAX_VALUE + "): " + len); Integer.MAX_VALUE + "): " + len);
} }
int lenInt = (int) len; int lenInt = (int) len;

Loading…
Cancel
Save