Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Increase rfc compliance #20

Merged
merged 3 commits into from Aug 9, 2016
Merged

Increase rfc compliance #20

merged 3 commits into from Aug 9, 2016

Conversation

skroczek
Copy link
Contributor

@skroczek skroczek commented Aug 9, 2016

Currently this beautiful library converts every domain with every length into it's punycode representation. But in RFC1034 and RFC2181 is defined that every label (or part) must be between 1 and 63 octets and a full domain name is limited to 255 octets (including the separators).
The idn_to_ascii functions returns an empty string if the given domain is invalid without trigger any error, but I don't think this is the best behaviour.
So I decided to make a pull request, to throw exceptions if an invalid domain is given.

@patrick-radius
Copy link

Thanks for your contribution. I am not a big fan of the assignments in conditions, would it be too much to ask to clean that up a bit?

@skroczek
Copy link
Contributor Author

skroczek commented Aug 9, 2016

@patrick-radius Thanks for your feedback. I've fixed it in the last commit. :)

@ceeram
Copy link
Contributor

ceeram commented Aug 9, 2016

👍 LGTM, thanks!

@ceeram ceeram merged commit 8d42d0a into true:master Aug 9, 2016
@ceeram
Copy link
Contributor

ceeram commented Aug 9, 2016

Created a new release including this change, v2.1.0 Thanks again

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants