-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
/api/search/{domain}: Add IDN compatibility #1715
Conversation
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works locally, but not remotely
nanopi@nanopi:~$ curl -s 127.0.0.1/api/search/äBC.com?debug=true | jq .search.debug.punycode
"xn--bc-uia.com"
chrko@ThinkPad-X230:~$ curl -s 10.0.1.24/api/search/äBC.com?debug=true
Error 400: Bad Request
chrko@ThinkPad-X230:~$ curl 10.0.1.24/api/search/abc.com?debug=true
{
"search": {
"domains": [],
"gravity": [],
"results": {
Signed-off-by: DL6ER <dl6er@dl6er.de>
Signed-off-by: DL6ER <dl6er@dl6er.de>
@yubiuser Should now be fixed. From my point of view, this is a bug in the CivetWeb server. I opened a PR with our proposed fix upstream: civetweb/civetweb#1209 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works as expected
chrko@ThinkPad-X230:~$ curl -s 10.0.1.24/api/search/äBC.com?debug=true
{
"search": {
"domains": [],
"gravity": [],
"results": {
"domains": {
"exact": 0,
"regex": 0
},
civetweb/civetweb#1209 has been merged upstream without changes. |
What does this implement/fix?
Lowercase domains passed to
GET /api/search/{domain}
and convert them to punycode (if applicable), e.g.,GET /api/search/äBC.cOm
(mind the Umlautä
) will now actually trigger a search forxn--bc-uia.com
Related issue or feature (if applicable): N/A
Pull request in docs with documentation (if applicable): N/A
By submitting this pull request, I confirm the following:
git rebase
)Checklist:
developmental
branch.