Only send "accept" headers on some HTTP methods
This commit is contained in:
parent
632a98965c
commit
690682a37e
|
@ -140,7 +140,7 @@ class HttpClient implements ICanSendHttpRequests
|
|||
}
|
||||
};
|
||||
|
||||
if (empty($conf[HttpClientOptions::HEADERS]['Accept'])) {
|
||||
if (empty($conf[HttpClientOptions::HEADERS]['Accept']) && in_array($method, ['get', 'head'])) {
|
||||
$this->logger->info('Accept header was missing, using default.', ['url' => $url, 'callstack' => System::callstack()]);
|
||||
$conf[HttpClientOptions::HEADERS]['Accept'] = HttpClientAccept::DEFAULT;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user