Skip to content

Make use of NSURLSession and WinHTTP on macOS and Windows#778

Merged
jviotti merged 7 commits into
mainfrom
native-http
Jun 12, 2026
Merged

Make use of NSURLSession and WinHTTP on macOS and Windows#778
jviotti merged 7 commits into
mainfrom
native-http

Conversation

@jviotti

@jviotti jviotti commented Jun 11, 2026

Copy link
Copy Markdown
Member

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

@jviotti jviotti force-pushed the native-http branch 2 times, most recently from c0252e8 to afc7bed Compare June 12, 2026 13:50
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti changed the title [WIP] Prototype an NSURLSession and WinHTTP HTTP client Make use of NSURLSession and WinHTTP on macOS and Windows Jun 12, 2026
@jviotti jviotti marked this pull request as ready for review June 12, 2026 14:01
@augmentcode

augmentcode Bot commented Jun 12, 2026

Copy link
Copy Markdown

This pull request is abnormally large and would use a significant amount of tokens to review. If you still wish to review it, comment "augment review" and we will review it.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

5 issues found across 96 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/http/http_darwin.mm">

<violation number="1" location="src/http/http_darwin.mm:80">
P2: This backend drops duplicate response headers by reading `allHeaderFields` from a dictionary. It violates `HTTPResponse` contract to preserve repeated headers and can lose semantics for headers that must not be comma-folded.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/http/http_windows.cc Outdated
Comment thread src/http/http_darwin.mm Outdated
Comment thread src/http/http_windows.cc
Comment thread src/http/http_darwin.mm Outdated
const auto *http_response{(NSHTTPURLResponse *)raw_response};
response_pointer->status = http_status_from_code(
static_cast<std::uint16_t>(http_response.statusCode));
[http_response.allHeaderFields

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: This backend drops duplicate response headers by reading allHeaderFields from a dictionary. It violates HTTPResponse contract to preserve repeated headers and can lose semantics for headers that must not be comma-folded.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/http/http_darwin.mm, line 80:

<comment>This backend drops duplicate response headers by reading `allHeaderFields` from a dictionary. It violates `HTTPResponse` contract to preserve repeated headers and can lose semantics for headers that must not be comma-folded.</comment>

<file context>
@@ -0,0 +1,109 @@
+                const auto *http_response{(NSHTTPURLResponse *)raw_response};
+                response_pointer->status = http_status_from_code(
+                    static_cast<std::uint16_t>(http_response.statusCode));
+                [http_response.allHeaderFields
+                    enumerateKeysAndObjectsUsingBlock:^(
+                        NSString *name, NSString *value, BOOL *) {
</file context>

Comment thread src/resolver.h Outdated
jviotti added 6 commits June 12, 2026 10:27
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti merged commit 6648199 into main Jun 12, 2026
15 checks passed
@jviotti jviotti deleted the native-http branch June 12, 2026 16:37
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.

1 participant