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

enable libxml2 "legacy" libraries #3247

Merged
merged 2 commits into from
Jun 23, 2024
Merged

enable libxml2 "legacy" libraries #3247

merged 2 commits into from
Jun 23, 2024

Conversation

flavorjones
Copy link
Member

What problem is this PR intended to solve?

libxml2 v2.13.0 disabled support for zlib, liblzma, and HTTP by default.

To avoid introducing a breaking change, this PR re-enables support for those features, see #3168 for discussion and a proposal to disable them in a future Nokogiri v2.0 release.

This PR also introduces a extconf.rb flag --disable-xml2-legacy to disable these features for people who wish to.

Also introduced is a boolean constant Nokogiri::LIBXML_ZLIB_ENABLED so that we can programmatically tell whether this support is present.

Have you included adequate test coverage?

Yes, basic test coverage (not complete).

Does this change affect the behavior of either the C or the Java implementations?

This prevents a behavior change in the CRuby impl. Note that the Java implementation has never supported automatic decompression of content (like libxml2 does with zlib/lzma support).

@flavorjones flavorjones force-pushed the 3168-libxml2-legacy branch from c34dbac to 3be3004 Compare June 22, 2024 13:59
this is insufficient coverage, there are other methods that likely
support decompression. this test is only intended to demonstrate an
instance of zlib/lzma support, relative to libxml2's "legacy" option
in v2.13.0.
@flavorjones flavorjones force-pushed the 3168-libxml2-legacy branch from 3be3004 to bdcfdac Compare June 22, 2024 13:59
- zlib
- liblzma
- HTTP

libxml2 v2.13.0 turned these off by default, so this commit re-enables
them.

I'm proposing to support this functionality in Nokogiri 1.x releases,
but remove it (possibly with an option to re-enable it) in Nokogiri
2.x. See #3168 for discussion.
@flavorjones flavorjones force-pushed the 3168-libxml2-legacy branch from bdcfdac to 46c1e10 Compare June 22, 2024 14:04
@flavorjones flavorjones merged commit ec2282c into main Jun 23, 2024
132 checks passed
@flavorjones flavorjones deleted the 3168-libxml2-legacy branch June 23, 2024 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant