friendica/friendica — pull request #7 by fabrixxm (2011-11-17 12:52:57+00:00)
Title: Fix possibile fatal error with oembed

When an item has something like [audio]http://.../file.ogg[/audio], oembed try to fetch that url as an html page to search for oembed tag. But this can cause "Fatal error: Allowed memory size of xxxxxx bytes exhausted"

This could lead to blank network page.

I've added an $accept_content parameter to fetch_url wich should add "Accept : mime/type" header to http request ( http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html ) , but I don't know if every server accept it, so i've added a blacklist of extensions to not fetch.