Skip to content
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

fix: send Content-Length: 0 to the Object Storage when file is empty #5912

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

rangoo94
Copy link
Member

@rangoo94 rangoo94 commented Oct 9, 2024

Pull request description

As per Golang's Request documentation:

	// For client requests, a value of 0 with a non-nil Body is
	// also treated as unknown.
	ContentLength int64

Because of that, we need to ensure the request.Body is nil when the ContentLength is 0 - otherwise Content-Length header won't be sent.

Checklist (choose whats happened)

  • breaking change! (describe)
  • tested locally
  • tested on cluster
  • added new dependencies
  • updated the docs
  • added a test

Fixes

@rangoo94 rangoo94 requested a review from a team as a code owner October 9, 2024 08:58
@rangoo94 rangoo94 merged commit 1180159 into main Oct 9, 2024
24 checks passed
@rangoo94 rangoo94 deleted the dawid/fix/zero-length-artifact branch October 9, 2024 09:35
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.

2 participants