This forum is now read-only. Support is provided at

Please consider registering
sp_LogInOut Log Insp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Forum Options

Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSSsp_TopicIcon
Patch for "Invalid URL" problem on URL import
9 June, 2013
11:08 pm
Forum Posts: 15
Member Since:
15 April, 2012
sp_UserOfflineSmall Offline

Hi, all...

I keep my sermon MP3s on another server and use the "URL to import" feature on the "Add Sermon" page to add them.  I was getting "Invalid URL" when trying to import, even though the URL was fine.  Turns out, for some reason the server hosting the MP3s was sending back "HTTP/1.0 200 OK" instead of "HTTP/1.1 200 OK" (it doesn't when I do a fetch from another system, so I'm wondering if the libs installed on the hosting provider are explicitly making 1.0 requests...).  The header check code in sb-includes/admin.php looks for exactly "HTTP/1.1 200 OK", so was failing my URL.

I actually solved this problem long ago, but my fix got clobbered when I installed the recent upgrade.  So I thought I'd post my fix to the forum in case a) someone else has had the problem, and b) so it can maybe make its way into the codebase.

My fix is just to check for a valid header with a 200 response code, ignoring HTTP version.  Here's a link to the patch:

10 June, 2013
5:00 am
Ben Miller
Appleton, WI, USA

Forum Posts: 1628
Member Since:
18 June, 2009
sp_UserOfflineSmall Offline

Thanks for posting this!  It look like a good change to me.  I'll see if we can get it into the next version.

Ben Miller, Pathways Church, Appleton, Wisconsin, USA
Read the new FAQ, last updated 11/21/2013
Announcing version 0.45.12

Forum Timezone: Europe/London
Most Users Ever Online: 381
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Rich Brown: 358
Matt Schlueter: 93
Mindy: 72
Don Johnson: 65
anointed: 57
0be1: 55
Member Stats:
Guest Posters: 7
Members: 3188
Moderators: 1
Admins: 1
Forum Stats:
Groups: 1
Forums: 2
Topics: 1713
Posts: 7499
Newest Members:
marktest, deatles50, ValeriaGoodriz, dapedPup, oapedPup, Margarettoimb
Moderators: Ben Miller: 1628
Administrators: Mark Barnes: 435