Skip to content
This repository has been archived by the owner on Apr 28, 2020. It is now read-only.

Commit

Permalink
#27 removing useless get call - a simple has call is more efficient
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius committed Aug 11, 2017
1 parent 4fcd18f commit af4197c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,15 +206,15 @@ public function doRequest($request, $response = null)

$headers = $httpRequest->getHeaders();

if (!$headers->get('Content-Type')) {
if (!$headers->has('Content-Type')) {
$headers->addHeaderLine('Content-Type', 'text/xml; charset=utf-8');
}

if (!$headers->get('Accept')) {
if (!$headers->has('Accept')) {
$headers->addHeaderLine('Accept', 'text/xml');
}

if (!$headers->get('user-agent')) {
if (!$headers->has('user-agent')) {
$headers->addHeaderLine('user-agent', 'Zend_XmlRpc_Client');
}

Expand Down

0 comments on commit af4197c

Please sign in to comment.