[v9_11] Fix the "idna" system test
This MR is the one which actually closes #1465 (closed).
6966422b is a backport of 2ee7ff23 from !2740 (merged).
367a576f fixes the idna
system test; it is not a backport and thus it needs to be reviewed.
Closes #1465 (closed)