CC-5450 : Refactor Media Management (Classes/DB) in Airtime

HEAD won't work for actual streams, just m3u etc.
This commit is contained in:
Naomi 2013-12-20 13:03:20 -05:00
parent 690b025e32
commit d1904cbba4
2 changed files with 2 additions and 15 deletions

View File

@ -11,14 +11,13 @@ class Filter_WebstreamRedirect implements Zend_Filter_Interface
return $value;
}
// By default get_headers uses a GET request to fetch the headers. If you
// want to send a HEAD request instead, you can do so using a stream context:
// By default get_headers uses a GET request to fetch the headers.
//using max redirects to avoid mixed headers,
//can manually follow redirects if a Location header exists.
stream_context_set_default(
array(
'http' => array(
'method' => 'HEAD',
'method' => 'GET',
'max_redirects' => '1'
)
)

View File

@ -31,18 +31,6 @@ class Validate_WebstreamUrl extends Zend_Validate_Abstract
{
Logging::info("checking if $value is valid");
// By default get_headers uses a GET request to fetch the headers. If you
// want to send a HEAD request instead, you can do so using a stream context:
//using max redirects to avoid mixed headers,
//can manually follow redirects if a Location header exists.
stream_context_set_default(
array(
'http' => array(
'method' => 'HEAD'
)
)
);
try {
//get an associative array of headers.
$headers = get_headers($value, 1);