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

Swift HTTP Types #288

Merged
merged 12 commits into from
Nov 28, 2023
Merged

Swift HTTP Types #288

merged 12 commits into from
Nov 28, 2023

Conversation

adam-fowler
Copy link
Member

No description provided.

@adam-fowler adam-fowler changed the base branch from main to 2.x.x November 21, 2023 15:35
attributes["http.scheme"] = request.uri.scheme?.rawValue
attributes["http.user_agent"] = request.headers.first(name: "user-agent")
attributes["http.request_content_length"] = request.headers["content-length"].first.map { Int($0) } ?? nil
// TODO: Get HTTP version and scheme
Copy link
Member

Choose a reason for hiding this comment

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

Commenting to mark this TODO

Copy link
Member Author

Choose a reason for hiding this comment

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

We never setup the scheme before, it always defaulted to nil. The swift http types don't include a version so not sure how we are going to get that

@adam-fowler adam-fowler requested a review from Joannis November 23, 2023 17:23
Package.swift Outdated
Comment on lines 14 to 17
// .library(name: "HummingbirdFoundation", targets: ["HummingbirdFoundation"]),
// .library(name: "HummingbirdJobs", targets: ["HummingbirdJobs"]),
// .library(name: "HummingbirdXCT", targets: ["HummingbirdXCT"]),
// .executable(name: "PerformanceTest", targets: ["PerformanceTest"]),
Copy link
Member

Choose a reason for hiding this comment

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

Any particular reason for lal these disabled products?

Package.swift Outdated
@@ -7,17 +7,19 @@ let package = Package(
name: "hummingbird",
platforms: [.macOS(.v14), .iOS(.v17), .tvOS(.v17)],
products: [
.library(name: "Hummingbird", targets: ["Hummingbird"]),
// .library(name: "Hummingbird", targets: ["Hummingbird"]),
Copy link
Member

Choose a reason for hiding this comment

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

Disabled product

@Joannis
Copy link
Member

Joannis commented Nov 24, 2023

What's changed looks good, but we have disabled some products. Can we get those back up & running?

Copy link
Member

@Joannis Joannis left a comment

Choose a reason for hiding this comment

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

LGTM, but disabled products

@adam-fowler
Copy link
Member Author

LGTM, but disabled products

I must have disabled them as I was getting stuff compiling.

Copy link

codecov bot commented Nov 27, 2023

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (bce4cb3) 84.97% compared to head (c280749) 84.85%.

❗ Current head c280749 differs from pull request most recent head 29bc8f5. Consider uploading reports for the commit 29bc8f5 to get more accurate results

Files Patch % Lines
Sources/HummingbirdCoreXCT/XCTClient.swift 62.50% 6 Missing ⚠️
Sources/Hummingbird/Router/RouteHandler.swift 50.00% 3 Missing ⚠️
...ources/Hummingbird/Middleware/CORSMiddleware.swift 86.66% 2 Missing ⚠️
...ources/HummingbirdCore/Response/HTTPResponse.swift 85.71% 2 Missing ⚠️
Sources/HummingbirdCoreXCT/XCTClient+types.swift 87.50% 2 Missing ⚠️
Sources/Hummingbird/Router/ResponseGenerator.swift 83.33% 1 Missing ⚠️
Sources/Hummingbird/Server/Request.swift 75.00% 1 Missing ⚠️
...mmingbirdCore/Server/HTTP/HTTPChannelHandler.swift 97.77% 1 Missing ⚠️
...mmingbirdFoundation/Cookies/Response+Cookies.swift 50.00% 1 Missing ⚠️
Sources/HummingbirdTLS/TLSChannelSetup.swift 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            2.x.x     #288      +/-   ##
==========================================
- Coverage   84.97%   84.85%   -0.13%     
==========================================
  Files          78       77       -1     
  Lines        4520     4515       -5     
==========================================
- Hits         3841     3831      -10     
- Misses        679      684       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adam-fowler adam-fowler merged commit 4dba2ba into 2.x.x Nov 28, 2023
1 check passed
@adam-fowler adam-fowler deleted the http-types branch November 28, 2023 07:50
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