Skip to content
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

Ensure sitemaps_host ends in / #236

Closed
jphager2 opened this issue May 5, 2016 · 4 comments
Closed

Ensure sitemaps_host ends in / #236

jphager2 opened this issue May 5, 2016 · 4 comments

Comments

@jphager2
Copy link

jphager2 commented May 5, 2016

Hello,

I think that sitemap_host should also be ensured to end in /. Similar to how it is done here.

Otherwise URI.join creates doesn't work as expected (if / is missing)

Alternatively, it could be added to the docs that sitemaps_host should end in a /.

Best,
John

@kjvarga
Copy link
Owner

kjvarga commented Jun 27, 2016

Thanks. Want to submit a pull request? ;)

@jphager2
Copy link
Author

Ok made a PR. Build is failing, though :(.

@kjvarga
Copy link
Owner

kjvarga commented Aug 10, 2016

Hi @jphager2 sorry for not responding for so long. I'm missing emails from this project...I have to check my filters. What problem were you encountering?

It works when the host doesn't end in a slash....

irb(main):993:0> URI.join('http://host.com', 'path', 'file.txt')
=> #<URI::HTTP:0x007fd6f411d9d8 URL:http://host.com/file.txt>

Where are you having a problem? Edit: oh I see it omitted the path. That is very strange!

@jphager2
Copy link
Author

So the original case where I have the problem was when assigning 'http://www.example.com/something' to the sitemap_host Now it's obvious to me that this is wrong semantically and that I should append 'something' to the sitemap_path.

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

No branches or pull requests

2 participants