gothfox/Tiny-Tiny-RSS — pull request #339 by hoelzro (2014-01-19 10:39:30+00:00)
Title: Small fixes (SSL host verification and non-URL Location headers)

Hello,

This pull request addresses two bugs I have found in my own installation (TinyTinyRSS version 1.11).

The first is an SSL verfication failure that occurs with self-signed certificates. I addressed a similar issue in an earlier pull request (#212), but it seems that there was some sort of bug in cURL that caused the `CURLOPT_SSL_VERIFYHOST` to be ignored if `CURLOPT_SSL_VERIFYPEER` was turned off (http://curl.haxx.se/docs/adv_20131217.html). This bug was fixed in cURL 7.34.0, so if TinyTinyRSS is being used with this version of cURL or later, it will fail on feeds using self-signed certificates. So the first commit turns off the `CURLOPT_SSL_VERIFYHOST` feature. This should probably be settable on a per-feed basis.

The second is a problem with 302 redirects and the `Location` header if the header is not a URL. Some sites (in my case, GitHub pages) send back a relative or absolute URL fragment to be intrepreted with respect to the original URL. The second and third commits address this scenario.

I don't write a lot of PHP, so please let me know if the code needs cleaning up.