Skip to content

Not reusable input stream in ContentCachingRequestWrapper [SPR-12810] #17407

@spring-projects-issues

Description

@spring-projects-issues

Vlad Bochenin opened SPR-12810 and commented

in org/springframework/web/util/ContentCachingRequestWrapper.java

When you call getParameterMap(), Tomcat, for example, reads parameters from InputStream, so impossible to read from input stream in servlet

I tried in Tomcat 7.0.52, but I think it will be reproduced in other servlet containers

Step to reproduce

  1. Register logging filter (CommonsRequestLogginFilter etc) in filter chain
  2. Execute POST Form request
  3. Try to read something from request input stream in servlet (after filter was executed)

Expected result:
you can read data from input stream

Actual Result:
You cannot read any data from input stream


Affects: 4.1.5

Issue Links:

Referenced from: commits 151e96c, abd7052, ce84faf, c6250f5

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions