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

Fix encoding and decoding of HTTPHeaders #3116

Merged
merged 3 commits into from
Dec 8, 2023
Merged

Conversation

gwynne
Copy link
Member

@gwynne gwynne commented Dec 8, 2023

These changes are now available in 4.89.1

The Codable conformance Vapor adds to the HTTPHeaders type now correctly handles cases where more than one header with the same name (such as Set-Cookie) is present, for both encoding and decoding.

The previous encoding format is still recognized for decoding, so that existing serialized data can be safely read.

@gwynne gwynne added bug Something isn't working semver-patch Internal changes only labels Dec 8, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #3116 (e0f251d) into main (3d62c0c) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3116      +/-   ##
==========================================
+ Coverage   76.34%   76.38%   +0.04%     
==========================================
  Files         211      211              
  Lines        8035     8049      +14     
==========================================
+ Hits         6134     6148      +14     
  Misses       1901     1901              
Files Coverage Δ
Sources/Vapor/HTTP/Headers/HTTPHeaders.swift 97.22% <100.00%> (+1.76%) ⬆️

@gwynne gwynne merged commit 00c902c into main Dec 8, 2023
17 checks passed
@gwynne gwynne deleted the codable-roundtripped-headers branch December 8, 2023 16:15
keniwhat pushed a commit to keniwhat/vapor that referenced this pull request Jan 19, 2024
* main: (44 commits)
  Update routing-kit version (vapor#3131)
  Use `singleton` `EventLoopGroup` (vapor#3128)
  Additional tests fixes
  Fix for Apple changing things without warning.
  Add missing availability annotations in URI tests
  Merge pull request from GHSA-r6r4-5pr8-gjcp
  Fix setting public folder for `FileMiddleware` when using bundles (vapor#3113)
  Consistently use the value from `X-Request-Id` as the request's ID when present (vapor#3117)
  Fix encoding and decoding of HTTPHeaders (vapor#3116)
  Add fully async entrypoints (vapor#3114)
  Bring back AsyncCommands (vapor#3109)
  General warnings and tests cleanup (vapor#3107)
  Add public initializer for `XCTHTTPRequest` (vapor#3106)
  [skip ci] Update dependabot.yml
  [skip ci] Fixup sponsors workflow
  Make Async Request Body actually work (vapor#3096)
  Create a thread pool of System.coreCount rather than 64 when initializing an Application (vapor#3092)
  Modernize sponsors automation workflow (vapor#3098)
  Bump the dependencies group with 2 updates (vapor#3099)
  Update README with new Sponsor (vapor#3101)
  ...

# Conflicts:
#	Package.swift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working semver-patch Internal changes only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants