Hello good people of Blubrry!
You may have noticed that users of the current Podcasts app for iOS (v2.1.2) can't just tap a feed://server.com/?feed=premium link and have the app ask for the username and password.
It'll work if you force the user credentials like so: feed://user:pass@server.com/?feed=premium
But that work-around will
not work in the Podcasts app that comes bundled with iOS 8 (v2.2).
The reason for this issue is, that the Podcasts app starts out asking for the HEAD of the feed URL before moving on.
If the URL needs authentication, the HEAD request should return status code 401 if none is passed, but in the current Blubrry version (v5.0.9) it detects that it's a HEAD request - and just returns 200. Not good.
My suggestion for a fix in powerpress.php:
Addition to the powerpress_exit_on_http_head($return) function, at line 401 (what are the odds?) just before the "// Set the content type for HTTP headers..." line, append:
// Needs authentication?
$GeneralSettings = get_option('powerpress_general');
if( isset($GeneralSettings['premium_caps']) && $GeneralSettings['premium_caps'] )
{
$feed_slug = get_query_var('feed');
$FeedSettings = get_option('powerpress_feed_'.$feed_slug);
if( !empty($FeedSettings['premium']) )
{
require_once( POWERPRESS_ABSPATH.'/powerpress-feed-auth.php');
powerpress_feed_auth( $feed_slug );
}
}
Thanks for a great plugin!