Skip to content

fix: include content-length with bytes payload #3695

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

imgurbot12
Copy link

@imgurbot12 imgurbot12 commented Jul 16, 2025

PR Type

Bug Fix

PR Checklist

  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • A changelog entry has been made for the appropriate packages.
  • Format code with the latest stable rustfmt.
  • (Team) Label with affected crates and semver status.

Overview

I noticed when writing my own tests for an actix-web service that the "Content-Length" is not sent when using TestRequest::set_form and TestRequest::set_json methods.

Both call HttpTestRequest::set_payload underneath so this should cover all cases at the root.

Hope this helps, thanks! :)

@JohnTitor JohnTitor added A-http project: actix-http B-semver-minor labels Jul 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-http project: actix-http B-semver-minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants