Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 62e0556

Browse files
Merge pull request #45 from Microsoft/sergkanz/removeSetterOfUserAgent
removed setting of User Agent on batched telemetry upload
2 parents 5e1d93d + ec3966a commit 62e0556

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

ApplicationInsights/Channel/Telemetry_Channel.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,6 @@ public function send($options = array(), $sendAsync = false)
185185
$headersArray = array('Accept' => 'application/json',
186186
'Content-Type' => 'application/json; charset=utf-8');
187187

188-
if (array_key_exists('HTTP_USER_AGENT', $_SERVER) == true)
189-
{
190-
$headersArray['User-Agent'] = $_SERVER['HTTP_USER_AGENT'];
191-
}
192-
193188
$body = utf8_encode($serializedTelemetryItem);
194189

195190
if ($this->_client !== null)

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Support for internal context and override of SDK version.
66
- Fix duration serialization for `trackPageView` call.
7+
- Do not send `User-Agent` when uploading telemetry to avoid misclassification of server telemetry as client telemetry.
78

89
## 0.4.2
910

0 commit comments

Comments
 (0)