Change authorization logic in project_packages.rb
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
Change authorization logic in project_packages.rb
Updated the authorize_workhorse! method calls to improve readability and added a has_length: false parameter to handle multipart uploads for AWS, specifically addressing issues with empty files like conaninfo.txt.
Context: when a conaninfo.txt has content we get the header Content-Length: [value], but when the conaninfo.txt is empty, we do not get the header Content-Length but the header Transfer-Encoding with value chunked.
References
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
I have not found an easy way to test if this fix the issue correctly as I would need to link my local env to s3.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #550925 (closed)