New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ShallowEtagHeaderFilter.setContentLength causes an error when rendering a jsp which performs an include: [SPR-13671] #18246

Closed
spring-issuemaster opened this Issue Nov 11, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

spring-issuemaster commented Nov 11, 2015

Neeraj A Khadakkar opened SPR-13671 and commented

This appears to be regression of issue 11717, where attempting to calculate Etag for jsp's which include other tags throws following exception :

SEVERE: Exception initializing page context
java.lang.IllegalArgumentException: New capacity must not be smaller than current size
at org.springframework.util.Assert.isTrue(Assert.java:68)
at org.springframework.util.FastByteArrayOutputStream.resize(FastByteArrayOutputStream.java:265)
at org.springframework.web.util.ContentCachingResponseWrapper.setBufferSize(ContentCachingResponseWrapper.java:143)
at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
at javax.servlet.ServletResponseWrapper.setBufferSize(ServletResponseWrapper.java:189)
at org.apache.jasper.runtime.JspWriterImpl.<init>(JspWriterImpl.java:138)
at org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:206)
at org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:174)
at org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:174)
at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:123)


Affects: 4.2.2

Reference URL: #16339

Issue Links:

  • #16339 ShallowEtagHeaderFilter setContentLength on include
@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

spring-issuemaster commented Nov 11, 2015

Juergen Hoeller commented

Thanks for the report - this seems to have got lost during the refactoring to FastByteArrayOutputStream...

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment