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

Use single constant for default HTTP Accept header #784

Merged
merged 3 commits into from
Feb 13, 2023

Conversation

Alkarex
Copy link
Contributor

@Alkarex Alkarex commented Feb 8, 2023

The same string was repeated 5 times.
And add missing headers in SimplePie_Locator::body()
Follow-up of 5d966b9
This prepares for an update of the content of the default HTTP Accept header in another PR.

And add missing headers in `SimplePie_Locator::body()`
Follow-up of simplepie@5d966b9
This prepares for an update of the content of the default HTTP Accept header in another PR.
];
$feed = $this->registry->create(File::class, [$value, $this->timeout, 5, null, $this->useragent, $this->force_fsockopen, $this->curl_options]);
$feed = $this->registry->create(File::class, [$value, $this->timeout, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options]);
Copy link
Contributor Author

@Alkarex Alkarex Feb 8, 2023

Choose a reason for hiding this comment

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

Likely forgotten in 5d966b9
Otherwise, the $headers variable was not used.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍
Looks like an error to me. I am in favor of fixing it this way.

@Alkarex
Copy link
Contributor Author

Alkarex commented Feb 8, 2023

Downstream PR FreshRSS/FreshRSS#5083

src/File.php Outdated Show resolved Hide resolved
];
$feed = $this->registry->create(File::class, [$value, $this->timeout, 5, null, $this->useragent, $this->force_fsockopen, $this->curl_options]);
$feed = $this->registry->create(File::class, [$value, $this->timeout, 5, $headers, $this->useragent, $this->force_fsockopen, $this->curl_options]);
Copy link
Contributor

Choose a reason for hiding this comment

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

👍
Looks like an error to me. I am in favor of fixing it this way.

Copy link
Contributor

@Art4 Art4 left a comment

Choose a reason for hiding this comment

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

Thank you 👍

src/SimplePie.php Outdated Show resolved Hide resolved
Co-authored-by: Jan Tojnar <jtojnar@gmail.com>
@mblaney mblaney merged commit 7b0901c into simplepie:master Feb 13, 2023
@Alkarex Alkarex deleted the http-accept branch February 24, 2023 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants