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

Correct Net::HTTP::Persistent bug when using newer versions #8387

Closed
wants to merge 3 commits into from

Conversation

DylanLacey
Copy link
Contributor

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

Fix the integration with the Net HTTP Persistent Gem.

Motivation and Context

The default Net::HTTP Library allows the end user to force SSL using the use_ssl= method. Net::HTTP::Persistent doesn't in newer releases. This causes errors to be thrown when using the Net::HTTP::Persistent shim.

This change moves SSL configuration into its own method, allowing the shim to handle this for different versions while keeping the default HTTP code clean.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

DylanLacey added 3 commits May 5, 2020 15:02
This change moves the SSL option configuration out of `http` and into `ssl_options`.

Doing so allows subclasses to create their own SSL config, without having to
clone `http` (and thus leading to less ongoing maintenance).

Primarily, this change allows for the `Net::HTTP::Persistent` shim to only set
`use_ssl` to true where needed; Newer releases of the library manage their own
SSL config.
@titusfortner
Copy link
Member

@twalpole / @p0deje weren't we considering deprecating/removing this class since we updated the default client to use keep-alive, which is the functionally equivalent way to do what Persistent does for HTTP v2? I think this class is only needed if HTTP2 isn't supported, which should be nothing at this point? Let me know if I'm off, I can't really remember our last conversation on this.

If we aren't removing the class, this code looks good to me. :)

@p0deje
Copy link
Member

p0deje commented Jun 4, 2020

@DylanLacey Persistent connections should work in the default client starting from 7c9ca8e. Do you not have it working and you need to use net-http-persistent?

@p0deje p0deje added the C-rb label Jun 4, 2020
@titusfortner
Copy link
Member

Hah, just noticed that we didn't have a conversation about removing it, I just suggested it and didn't follow up: #7065 (comment)

@DylanLacey
Copy link
Contributor Author

Either of these are fine by me! I didn't note the change to the standard HTTP client and since the Persistent shim was still present but not working...

Shall I leave this open for a week or so in case anyone else is watching the issue tracker with rabid interest for Persistent improvements and has an argument for keeping it?

@p0deje
Copy link
Member

p0deje commented Jun 5, 2020

I believe we should proceed with deprecating this class in favor of default HTTP client for 4.0.

@diemol diemol closed this Jul 12, 2020
@diemol diemol reopened this Jul 12, 2020
@diemol diemol changed the base branch from master to trunk July 12, 2020 19:44
@titusfortner
Copy link
Member

And deprecated: f6d831b

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.

4 participants