Follow redirects when getting data. Better CC checking
rodzic
7f2cd763d0
commit
cb5d5b7603
|
@ -336,7 +336,11 @@
|
|||
|
||||
// Has the user has been specifically CC'd?
|
||||
if ( isset( $inbox_message["cc"] ) ) {
|
||||
$reply = in_array( "https://{$server}/{$username}", $inbox_message["cc"] );
|
||||
if ( is_array( $inbox_message["cc"] ) ) {
|
||||
$reply = in_array( "https://{$server}/{$username}", $inbox_message["cc"] );
|
||||
} else {
|
||||
$reply = ( "https://{$server}/{$username}" === $inbox_message["cc"] );
|
||||
}
|
||||
} else {
|
||||
$reply = false;
|
||||
}
|
||||
|
@ -1256,6 +1260,7 @@ HTML;
|
|||
// Set cURL options
|
||||
$ch = curl_init( $url );
|
||||
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
|
||||
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
|
||||
curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
|
||||
curl_setopt( $ch, CURLOPT_USERAGENT, USERAGENT );
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue