Skip to content

utils/curl: use specs when checking http content problems#10402

Merged
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
Rylan12:audit-url-spec-fix
Jan 25, 2021
Merged

utils/curl: use specs when checking http content problems#10402
MikeMcQuaid merged 1 commit intoHomebrew:masterfrom
Rylan12:audit-url-spec-fix

Conversation

@Rylan12
Copy link
Copy Markdown
Member

@Rylan12 Rylan12 commented Jan 23, 2021

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?
  • Have you successfully run brew man locally and committed any changes?

See Homebrew/discussions#576

Currently, specs passed to the url method are passed to curl when fetching the resource but aren't passed to curl when auditing the resource's url. For example, the user who opened Homebrew/discussions#576 needed to use the --referrer flag in curl. That meant that brew audit --online was failing even though the url was reachable when actually running brew install.

This PR passes those specs on to Utils::Curl.curl_check_http_content to ensure that the check will pass in situations like these.

@BrewTestBot
Copy link
Copy Markdown
Contributor

Review period will end on 2021-01-26 at 00:00:00 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Jan 23, 2021
@MikeMcQuaid MikeMcQuaid added the critical Critical change which should be shipped as soon as possible. label Jan 25, 2021
@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Jan 25, 2021
@BrewTestBot
Copy link
Copy Markdown
Contributor

Review period skipped due to critical label.

@MikeMcQuaid MikeMcQuaid merged commit 8da7e10 into Homebrew:master Jan 25, 2021
@MikeMcQuaid
Copy link
Copy Markdown
Member

Thanks again @Rylan12!

@Rylan12 Rylan12 deleted the audit-url-spec-fix branch January 25, 2021 14:06
@cesarcoatl
Copy link
Copy Markdown

Great work, @Rylan12! 🥇

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Feb 25, 2021
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Feb 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

critical Critical change which should be shipped as soon as possible. outdated PR was locked due to age

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants