Repository navigation
fix(client): declare Content-Length on gateway uploads - #460
Merged
neilmartin83 merged 1 commit intoOct 29, 2026
Merged
neilmartin83 merged 1 commit into
neilmartin83 merged 1 commit into
Conversation
4 tasks done
ktn-jamf
force-pushed
the
fix/gateway-upload-content-length
branch
from
October 26, 2026 22:43
b1715bd to
dfc8600
Compare
Upload on the platform gateway still goes over HTTP/1.1 but now sends the Content-Length its caller computed instead of forcing a chunked body, matching jamfplatform-go-sdk's own multipart uploads. Direct instance connections are unchanged (h2, declared length). Measured 2026-10-26 on the EU gateway (7 ms RTT, 20 MiB random body, fresh connection per upload, 8 rounds): HTTP/1.1 8.1-9.1 MiB/s declared and 7.6-9.4 chunked, so framing makes no measurable difference; HTTP/2 3.5-9.2 MiB/s with 7 of 16 runs under 5 MiB/s, so HTTP/1.1 stays. wireLength is gone, since it now always equals contentLength. A caller passing -1 is still sent chunked, and -v labels that "chunked". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
neilmartin83
force-pushed
the
fix/gateway-upload-content-length
branch
from
October 28, 2026 18:17
dfc8600 to
5edefb1
Compare
grahampugh
approved these changes
Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on
fix/package-upload-unverified-hash-stacked.Summary
Client.Uploadon the platform gateway stays on HTTP/1.1 but now sends the caller'sContent-Lengthinstead of forcing a chunked body. This matches jamfplatform-go-sdk's multipart uploads (feat(client)!: declare Content-Length on every multipart upload, never chunked jamf/jamfplatform-go-sdk#114).pro packages uploadand the generated icon, branding, enrollment-customization, extension-attribute, inventory-preload and prestage uploads.wireLengthis removed, since it always equalledcontentLength. A caller passing-1is still sent chunked, and-vlabels thatchunked.Evidence
20 MiB random body on the EU gateway (7 ms RTT), 2026-10-26, a new connection per upload, 8 rounds, every upload returned 201:
Test plan
make testmake lintTestUpload_GatewayIsHTTP1WithLength(renamed fromTestUpload_GatewayIsHTTP1Chunked) asserts h1 + a declared length against a TLS server that offers h2🤖 Generated with Claude Code