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

[stable22] Make X-HAS-{MD5/SHA256} opt-in #32760

Merged
merged 1 commit into from Jun 10, 2022

Conversation

CarlSchwan
Copy link
Member

This is not always needed and slow down the upload

Signed-off-by: Carl Schwan carl@carlschwan.eu
(cherry picked from commit 1b426ed)

This is not always needed and slow down the upload

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
(cherry picked from commit 1b426ed)
@CarlSchwan CarlSchwan requested review from a team, icewind1991, blizzz and juliushaertl and removed request for a team June 8, 2022 11:42
if ($this->request->getHeader('X-HASH') !== '') {
$hash = $this->request->getHeader('X-HASH');
if ($hash === 'all' || $hash === 'md5') {
$data = HashWrapper::wrap($data, 'md5', function ($hash) {

Check notice

Code scanning / Psalm

MissingClosureParamType

Parameter $hash has no provided type
}

if ($hash === 'all' || $hash === 'sha1') {
$data = HashWrapper::wrap($data, 'sha1', function ($hash) {

Check notice

Code scanning / Psalm

MissingClosureParamType

Parameter $hash has no provided type
}

if ($hash === 'all' || $hash === 'sha256') {
$data = HashWrapper::wrap($data, 'sha256', function ($hash) {

Check notice

Code scanning / Psalm

MissingClosureParamType

Parameter $hash has no provided type
Copy link
Member

@PVince81 PVince81 left a comment

Choose a reason for hiding this comment

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

👍

@CarlSchwan CarlSchwan merged commit 31d00c4 into stable22 Jun 10, 2022
@CarlSchwan CarlSchwan deleted the backport/stable22/upload-speed branch June 10, 2022 09:35
@blizzz blizzz mentioned this pull request Jun 10, 2022
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.

None yet

3 participants