Skip to content
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

Update cookie handling to align with rfc6265 specifications #1056

Merged
merged 8 commits into from
Oct 8, 2024

Conversation

2012160085
Copy link
Contributor

Issue #, if available: #867

Description of changes:

Refactored the cookie processing logic to comply with RFC 6265 specifications.

  • Introduced CookieProcessor interface and AwsCookieProcessor implementation:
    • Encapsulates cookie parsing and formatting logic according to RFC 6265.
  • Refactored AwsHttpServletResponse and AwsHttpServletRequest:
    • Updated to use the CookieProcessor for all cookie-related operations.
    • Centralized cookie handling logic by removing it from the AWS HTTP classes.
  • Ensured proper handling of cookies with Max-Age=0:
    • Cookies now expire immediately as specified by RFC 6265.

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.

2012160085 and others added 6 commits September 22, 2024 15:10
- Created a `CookieProcessor` interface along with its implementation `AwsCookieProcessor` to encapsulate cookie parsing and formatting logic.
- Modified `AwsHttpServletResponse` and `AwsHttpServletRequest` to use the `CookieProcessor` for all cookie-related operations.
- Replaced the usage of `SimpleDateFormat` with `DateTimeFormatter` to ensure thread-safe date formatting.
Copy link
Contributor

@jonife jonife left a comment

Choose a reason for hiding this comment

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

LGTM

@2012160085 2012160085 requested a review from jonife October 2, 2024 08:41
@2012160085
Copy link
Contributor Author

@jonife Sorry, I accidentally re-requested your review. There are no new changes. Thanks!

@jonife jonife merged commit e6abc1f into aws:main Oct 8, 2024
4 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.

2 participants