Closed ghost closed 2 years ago
Since #27 Travis always runs the tests with the network. Should I fix the test to be aligned with the live data? Or should we make the test run without network by default (so that on installation they are run in a close environment)?
I went with updating the tests. I realize that the nic.se
zone has evolved recently. Maybe we should make a pass over the tests to reduce potential gaps with the current configuration.
Did you consider using https://metacpan.org/pod/Net::LibIDN2 instead? That way maybe we could simply drop some of our own XS code.
Did you consider using https://metacpan.org/pod/Net::LibIDN2 instead?
No I haven't. Thanks for the pointer.
I think it would be a good idea to use Net::LibIDN2 instead. There is some magic that the IDN libraries do, such as down casing and making NFC. With Net::LibIDN2 we would have control of that. We could have a test case that verifies that labels that look like A-labels also are valid A-labels.
Would we loose anything by using Net::LibIDN2 instead?
Should we have any discussion about this PR? I thought that this would be replaced by #144.
Since I don't think I'll be able to address #144 for v2022.1, I think it would be nice to integrate this change in v2022.1.
@matsduf, is the suggested flag correct? Do you see a change in behavior by using libidn2?
I've seen I forgot to update the Dockerfile and some references to "libidn". This is fixed. Please re-review.
Purpose
Replace libidn with libidn2 following https://libidn.gitlab.io/libidn2/manual/libidn2.html#Converting-from-libidn.
Context
131
Changes
libidn2
instead oflibidn
libidn2
header ininclude/LDNS.h
src/LDNS.xs
How to test this PR
The tests should pass.
Discussion
Old code was using
IDNA_ALLOW_UNASSIGNED
inidna_to_ascii_8z
. Even if this flag exists in IDN2 (IDN2_ALLOW_UNASSIGNED
) it seems it has been kept for compatibility reason and is unused. I haven't dig any further, but do we need to keep this flag, or should we update some logic in the code to keep the expected behavior we had with the old code?