improve HttpServletRequest for Springboot4#1590
Conversation
reedham-aws
left a comment
There was a problem hiding this comment.
Are there any tests that need to be updated for this?
no |
reedham-aws
left a comment
There was a problem hiding this comment.
no
Should there be tests for this to prevent another future regression?
| AwsProxyHttpServletRequest httpServletRequest = new AwsProxyHttpServletRequest(v1Request, lambdaContext, securityWriter.writeSecurityContext(v1Request, lambdaContext)); | ||
| httpServletRequest.setServletContext(servletContext); | ||
| return httpServletRequest; | ||
| ServerlessHttpServletRequest httpRequest = new ServerlessHttpServletRequest(servletContext, v1Request.getHttpMethod(), v1Request.getPath()); |
There was a problem hiding this comment.
What is the difference between AwsProxyHttpServletRequest and ServerlessHttpServletRequest? I guess they're both HttpServletRequests but could in theory have different behavior, right? This might be a basic question I'm just not very familiar.
There was a problem hiding this comment.
Could getMultiValueHeaders be null? There's a check for it above and this code runs regardless.
I added four new test methods in springboot 3 and 4 modules to cover null and attribute values for http requests 👍 |
Issue #, if available:
PR to address this issue: #1589
Description of changes:
Fixing current springboot4 implementation to keep same functionality as springboot3
By submitting this pull request