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

Rollback changes from PR #657 #839

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/Transport/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
final class Curl implements Transport {
const CURL_7_10_5 = 0x070A05;
const CURL_7_16_2 = 0x071002;
const CURL_7_22_0 = 0x071600;

/**
* Raw HTTP data
Expand Down Expand Up @@ -383,7 +382,7 @@ private function setup_handle($url, $headers, $data, $options) {
$options['hooks']->dispatch('curl.before_request', [&$this->handle]);

// Force closing the connection for old versions of cURL (<7.22).
Copy link

Choose a reason for hiding this comment

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

This comment is no longer valid.

Copy link
Member

Choose a reason for hiding this comment

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

The comment was already present before we made the problematic change and was the reason why we used the specific version constraint we ended up with. Before we fully understand the context and where this was originally coming for, I'll prefer to keep in in there.

Choose a reason for hiding this comment

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

The version number in the comment could be a cause for confusion going forward, just a heads up.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, indeed, and I think that's what has already happened in this case.
But I'm still assuming there is a reason why this was put in there initially. I'd like to understand this better before removing it.

Copy link
Member

Choose a reason for hiding this comment

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

For future reference, this is the PR that introduced the comment: #211

if ($this->version < self::CURL_7_22_0 && !isset($headers['Connection'])) {
if (!isset($headers['Connection'])) {
$headers['Connection'] = 'close';
}

Expand Down