amir-jakoby / crawler-commons

Automatically exported from code.google.com/p/crawler-commons
0 stars 0 forks source link

[Sitemaps] SiteMap.setBaseUrl(...) causes the domain name to be lowered case which shouldn't happen #56

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In SiteMap.java

The method: setBaseUrl(URL sitemapUrl)

saves the baseUrl from the sitemap URL by chopping the tailing sitemap filename

so if the sitemap Url is: http://example.com/abs/sitemap.xml
then the base URL should be: http://example.com/abs/

But the first line of this method is:
baseUrl = sitemapUrl.toString().toLowerCase();

I think it is wrong as URLs might be case sensitive, so the saved baseUrl 
should be saved also as case sensitive

Original issue reported on code.google.com by avrah...@gmail.com on 26 Oct 2014 at 12:14

GoogleCodeExporter commented 8 years ago
Attaching the simple fix patch

Original comment by avrah...@gmail.com on 26 Oct 2014 at 12:16

GoogleCodeExporter commented 8 years ago
Attaching the real patch

Original comment by avrah...@gmail.com on 26 Oct 2014 at 12:19

Attachments:

GoogleCodeExporter commented 8 years ago
+ 1 Avi

Original comment by lewis.mc...@gmail.com on 27 Oct 2014 at 7:18

GoogleCodeExporter commented 8 years ago
Committed at Rev 153

Original comment by avrah...@gmail.com on 21 Nov 2014 at 12:02