Skip to content

Should call getNativeResponse() instead of getNativeRequest() in FrameworkServlet [SPR-15867] #20422

Closed
@spring-projects-issues

Description

@spring-projects-issues

Etienne Neveu opened SPR-15867 and commented

While reading the code of FrameworkServlet#RequestBindingInterceptor, I noticed that we try to obtain the HttpServletResponse using webRequest.getNativeRequest(HttpServletResponse.class) instead of webRequest.getNativeResponse(HttpServletResponse.class) :

https://github.com/spring-projects/spring-framework/blob/v5.0.0.RC3/spring-webmvc/src/main/java/org/springframework/web/servlet/FrameworkServlet.java#L1142

I'm wondering if it's a typo, and if it should be fixed?

I'm not sure about the impact, but it seems to have been added in this commit, so I guess it is not a huge issue, since the code is here since 2013... But I thought I might as well create a ticket, just in case.


Affects: 4.3.10, 5.0 RC3

Issue Links:

Referenced from: commits 9dcdfec, b8f5e97

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