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

Reflecting the case-insensitivity of http headers #275

Merged
merged 2 commits into from
Mar 3, 2023
Merged

Conversation

therealryan
Copy link
Contributor

@therealryan therealryan commented Feb 27, 2023

I recently went on a really unfun yak-shaving expedition when I:

  1. Added an endpoint that uses the PATCH http method
  2. Added a flow that exercised it
  3. Discovered that the standard java HttpURLConnection stuff just doesn't support that
  4. Refactored to use the new HTTPClient stuff in java 11
  5. Found that HTTPHeaders only reports lower-case header names, even though we're confident that the service returns mixed-case. This broke the chunked transfer-encoding stuff that the HttpMsg types do, and required a bunch of tedious test-data updates.

HTTPHeaders's casing behaviour is the correct position, so we're going to adapt to that.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Copy link

@apanayotopoulos apanayotopoulos left a comment

Choose a reason for hiding this comment

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

Looks pretty straightforward to me

Copy link

@oconnord oconnord left a comment

Choose a reason for hiding this comment

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

Happy with these changes.

@therealryan therealryan linked an issue Mar 3, 2023 that may be closed by this pull request
@therealryan therealryan merged commit c27e201 into main Mar 3, 2023
@therealryan therealryan deleted the header_case branch March 3, 2023 09:02
@therealryan therealryan added the enhancement New feature or request label Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HTTP header case sensitivity
5 participants