Skip to content

Replace hardcoded "Sec-WebSocket-Version" with constant - #34319

Closed
kwondh5217 wants to merge 1 commit into
spring-projects:mainfrom
kwondh5217:main
Closed

Replace hardcoded "Sec-WebSocket-Version" with constant#34319
kwondh5217 wants to merge 1 commit into
spring-projects:mainfrom
kwondh5217:main

Conversation

@kwondh5217

@kwondh5217kwondh5217 commented Jan 24, 2025

Copy link
Copy Markdown
Contributor

Motivation

The current implementation uses a hardcoded string "Sec-WebSocket-Version" in the method, while also using the constant WebSocketHttpHeaders.SEC_WEBSOCKET_VERSION within the same method. This inconsistency could lead to potential errors during maintenance and reduces code readability.

Modification

  • Replaced the hardcoded string "Sec-WebSocket-Version" with the constant WebSocketHttpHeaders.SEC_WEBSOCKET_VERSION.
  • Ensures consistent usage of constants throughout the method for better readability and maintainability.

Result

This is a purely refactor-level change. No functional behavior has been altered, and existing functionality remains intact.

Signed-off-by: Daeho Kwon <trewq231@naver.com>
@spring-projects-issuesspring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jan 24, 2025
@rstoyanchevrstoyanchev added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Feb 3, 2025
@rstoyanchevrstoyanchev self-assigned this Feb 3, 2025
@rstoyanchevrstoyanchev added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Feb 3, 2025
@rstoyanchevrstoyanchev added this to the 6.2.3 milestone Feb 3, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: taskA general task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@kwondh5217@rstoyanchev@spring-projects-issues