laserchicken icon indicating copy to clipboard operation
laserchicken copied to clipboard

feed urls without leading protocol

Open tilboerner opened this issue 12 years ago • 4 comments

When an incomplete feed URL (without the protocol part) is entered, Laserchicken should add http:// as default. Otherwise, feed duplication won't be recognized and links to feed XML will break.

tilboerner avatar Jul 23 '13 16:07 tilboerner

feed duplication won't be recognized

Same goes for alias URLs with trailing / or www subdomains. Just something to think about.

tilboerner avatar Jul 23 '13 21:07 tilboerner

what do you mean with links to feed XML will break

Entered a feed-url without http:// but got no errors.. Can you give some information how to reproduce it?

XORwell avatar Aug 13 '13 10:08 XORwell

Sorry, should have been more precise. When you're admin, you have access to the /feeds resource, which lists all known feeds. In that list, there's a link to the actual XML with the (probably misleading) name "(web)". Without a a leading protocol, this link is treated as relative, which is incorrect.

I think the best way to deal with this is to make the URL complete by adding a default protocol as early as possible.

Incomplete URLs already in the database could be changed with the help of a migration, I guess.

tilboerner avatar Aug 13 '13 11:08 tilboerner

i decided to fix #10 a bit nicer than before and ended with a class which may also help to fix incomplete urls already in the database https://github.com/XORwell/laserchicken/commit/85a1f09f86afbd8a9bc938355b4f0dfeb6c1c92a

XORwell avatar Aug 13 '13 22:08 XORwell