I have a website which allows people to input their RSS into their profile, from which I use feeds to import.
I noticed that HTTPFetcher, can't import a feed unless it's prefixed with http:// or other scheme it considers valid.
I would argue that http:// should be implied and if no scheme exists, then it should default to http:// instead of throwing an error.
I know I could resolve this upon having my users input their URLs, but again, it should be implied and I'm not interested in throwing errors, where they do not need to be. While I tell my users to prefix with http:// many do not. Eventually, I'll be changing my code completely to verify the existence of remote RSS feeds altogether.
Simplepie for instance does not require http:// to be prefixed and instead follow 1-6 of these "Ultra-liberal" RSS locators. Unfortunately since we have a HTTPFetcher before simplepie, we don't get the benefits.
http://web.archive.org/web/20110607232437/http://diveintomark.org/archiv...
http://simplepie.org/wiki/reference/simplepie/set_autodiscovery_level
Just a suggestion.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | feeds-http-fetcher-auto-scheme-2046335-5.patch | 5.88 KB | twistor |
| #4 | feeds-http-fetcher-auto-scheme-2046335-4.patch | 4.2 KB | twistor |
| #3 | feeds-http-fetcher-auto-scheme-2046335-3.patch | 4.31 KB | twistor |
| #1 | 2046335-feeds-http-prefix-error-1002-1.patch | 700 bytes | j0rd |
Comments
Comment #1
j0rd commentedHere's my lazy patch which resolves the issue for me, but I think is a little too lazy and should perhaps be improved upon.
Comment #2
twistor commentedThis is reasonable, but we should do it in the form, not http_request_get().
Comment #3
twistor commentedHow's this?
Comment #4
twistor commentedThis changes the http fetcher form around a bit. Concealing some settings that aren't usually used.
Comment #5
twistor commentedLet's try it with the test.
Comment #6
twistor commentedhttp://drupalcode.org/project/feeds.git/commit/ce0b51b