Skip to content

feat: send bytes= query param on upload measurements#119

Closed
devandrepascoa wants to merge 3 commits into
cloudflare:mainfrom
devandrepascoa:apascoa/upload-bytes-param
Closed

feat: send bytes= query param on upload measurements#119
devandrepascoa wants to merge 3 commits into
cloudflare:mainfrom
devandrepascoa:apascoa/upload-bytes-param

Conversation

@devandrepascoa
Copy link
Copy Markdown
Contributor

@devandrepascoa devandrepascoa commented Jun 5, 2026

Adds the upload size signal needed by the speed.cloudflare.com server cap.

  • Upload requests now include bytes=<size>, matching download requests.
  • Upload logging now uses cf-meta-upload-bytes when the server returns it, so capped uploads log the server-accepted byte count instead of the client-requested size.

No user-visible behavior change for normal clients: bytes= matches the upload body size. If the server caps an over-sized upload, the log payload reflects the capped byte count.

Uploads now include the measurement size as a bytes= query parameter
(matching the download direction). The POST body is already exactly
numBytes, so this lets the server bound/measure upload volume from the
URL without relying on Content-Length (e.g. for streamed/chunked clients
or edge WAF rules).
@devandrepascoa
Copy link
Copy Markdown
Contributor Author

Superseded by upstream-branch PR #120: #120

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