abhinav-phi opened a new issue, #2145:
URL: https://github.com/apache/stormcrawler/issues/2145

   Follow-up from #2122 (review by rzo1).
   
   okhttp punycodes the host when it parses a URL: 
`IDN.toASCII("ExAmpleé.org")` gives `xn--exampl-gva.org`. 
`URLUtil.getCanonicalHost` (introduced in #2122 for politeness queues and the 
robots.txt cache) lowercases and percent-decodes the host but does not punycode 
it, so the Unicode and punycode spellings of one server still get separate 
politeness queues and separate robots.txt cache entries:
   
   - `http://ExAmpleé.org/` → host `ExAmpleé.org` → key `examplé.org`
   - `http://xn--exampl-gva.org/` → key `xn--exampl-gva.org`
   
   Suggested fix: apply `IDN.toASCII` in `getCanonicalHost` (falling back to 
the raw host when the label is not a valid IDN), so both spellings collapse the 
way okhttp collapses them at connect time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to