Skip to content

improve HttpServletRequest for Springboot4#1590

Merged
tobixlea merged 6 commits intoaws:mainfrom
tobixlea:sjc-spring-boot-update
Feb 17, 2026
Merged

improve HttpServletRequest for Springboot4#1590
tobixlea merged 6 commits intoaws:mainfrom
tobixlea:sjc-spring-boot-update

Conversation

@tobixlea
Copy link
Contributor

@tobixlea tobixlea commented Feb 12, 2026

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

  • I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • I confirm that I've made a best effort attempt to update all relevant documentation.

Copy link
Contributor

@reedham-aws reedham-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there any tests that need to be updated for this?

@tobixlea
Copy link
Contributor Author

Are there any tests that need to be updated for this?

no

@tobixlea tobixlea requested a review from reedham-aws February 17, 2026 17:56
Copy link
Contributor

@reedham-aws reedham-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could getMultiValueHeaders be null? There's a check for it above and this code runs regardless.

@tobixlea tobixlea requested a review from reedham-aws February 17, 2026 21:11
@tobixlea
Copy link
Contributor Author

no

Should there be tests for this to prevent another future regression?

I added four new test methods in springboot 3 and 4 modules to cover null and attribute values for http requests 👍

@tobixlea tobixlea merged commit 9cb2e2f into aws:main Feb 17, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments