Skip to content

Conversation

ksafonov-db
Copy link
Contributor

@ksafonov-db ksafonov-db commented Mar 7, 2025

What changes are proposed in this pull request?

When performing single-shot upload, determine content length (via utility method from Python requests library), and if length is known, fill the Content-Length HTTP header. Then server will respect this header to validate request body size against.

How is this tested?

Added unit test.

NO_CHANGELOG=true


session = requests.Session()
with requests_mock.Mocker(session=session) as session_mock:
session_mock.get(f"http://localhost/api/2.0/fs/files{MultipartUploadTestCase.path}", status_code=200)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

cleanup

Copy link

github-actions bot commented Mar 7, 2025

Please ensure that the NEXT_CHANGELOG.md file is updated with any relevant changes.
If this is not necessary for your PR, please include the following in your PR description:
NO_CHANGELOG=true
and rerun the job.

Copy link

github-actions bot commented Mar 7, 2025

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/sdk-py

Inputs:

  • PR number: 919
  • Commit SHA: a780bba610aa41abf1504e0260b78f26ca6fc3ed

Checks will be approved automatically on success.

@renaudhartert-db renaudhartert-db self-requested a review May 22, 2025 15:08
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