Add flexibility to getFileSizeViaCurl#40065
Merged
phil-davis merged 2 commits intomasterfrom May 19, 2022
Merged
Conversation
b133f47 to
d998335
Compare
jvillafanez
reviewed
May 10, 2022
d998335 to
a8ae58f
Compare
a63b3ce to
1b826e4
Compare
|
Kudos, SonarCloud Quality Gate passed! |
jvillafanez
approved these changes
May 16, 2022
Contributor
Author
|
Note: this changes some real code. I will merge after 10.10.0 release is really happening, just to reduce any chance of a conflict in merging-back the 10.10.0 release branch. There is no hurry to actually merge this to master - it can happily end up in some future release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.








Description
See discussion in the related issue, and the code comments in this PR.
CURLOPT_HEADERis not always causing the headers to actually be returned. That is a bug somewhere in php-curl and/or libcurl and their "integration" on Ubuntu 20.04 and 22.04.This PR adds to the code of
getFileSizeViaCurlso that it usesCURLOPT_HEADERFUNCTIONand finds the Content-Length from there, if the data is not returned byCURLOPT_HEADER.I have confirmed that this works on Ubuntu 20.04 - see PR #40006 which now passes. And locally on Ubuntu 22.04 in a VM.
Related Issue
#38348
How Has This Been Tested?
CI with Ubuntu 18.04 (this PR) and 20.04 (PR #40006 )
Types of changes
Checklist: