CC-5450 : Refactor Media Management (Classes/DB) in Airtime
HEAD won't work for actual streams, just m3u etc.
This commit is contained in:
parent
690b025e32
commit
d1904cbba4
|
@ -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'
|
||||
)
|
||||
)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue