Skip to content

Commit 6293220

Browse files
committed
Setting a default UA.
Closes #512.
1 parent b2ae322 commit 6293220

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ ChangeLog
2525
cases where no other plugin set a correct HTTP status.
2626
* #686: Corrected PDO principal backend's findByURI for email addresses that
2727
don't match the exact capitalization.
28+
* #512: The client now has it's own `User-Agent`.
2829

2930

3031
3.1.0-alpha2 (2015-09-05)

lib/DAV/Client.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ function __construct(array $settings) {
165165
$this->addCurlSetting(CURLOPT_ENCODING, implode(',', $encodings));
166166
}
167167

168+
$this->addCurlSetting(CURLOPT_USERAGENT, 'sabre-dav/' . Version::VERSION . ' (http://sabre.io/)');
169+
168170
$this->xml = new Xml\Service();
169171
// BC
170172
$this->propertyMap = & $this->xml->elementMap;

0 commit comments

Comments
 (0)