Fix allow_url_fopen request handling

Issue #12465

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2016-08-29 11:21:50 +02:00
parent 438244650e
commit 5a8666c36a

View File

@ -4959,12 +4959,18 @@ class Util
$context = array(
'http' => array(
'method' => $method,
'content' => $content,
'header' => $header,
'request_fulluri' => true,
'timeout' => $connection_timeout
'timeout' => $connection_timeout,
'header' => "Accept: */*\nUser-Agent: phpMyAdmin",
)
);
if ($header) {
$context['http']['header'] .= "\nExpect: ". $header;
}
if ($method == "POST") {
$context['http']['content'] = $content;
}
$context = Util::handleContext($context);
$response = @file_get_contents(
$url,