Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Send client version in User-Agent header

  • Loading branch information...
commit fc9589feb4c39a16c4d3e5846a3749034767237e 1 parent bb03f16
@dcramer dcramer authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Raven/Client.php
View
6 lib/Raven/Client.php
@@ -17,6 +17,8 @@
class Raven_Client
{
+ const VERSION = '0.1.0';
+
const DEBUG = 10;
const INFO = 20;
const WARN = 30;
@@ -251,13 +253,15 @@ public function send($data)
$message = base64_encode(gzcompress(Raven_Compat::json_encode($data)));
foreach($this->servers as $url) {
+ $client_string = 'raven-php/' . self::VERSION;
$timestamp = microtime(true);
$signature = $this->get_signature(
$message, $timestamp, $this->secret_key);
$headers = array(
+ 'User-Agent' => $client_string,
'X-Sentry-Auth' => $this->get_auth_header(
- $signature, $timestamp, 'raven-php/0.1', $this->public_key),
+ $signature, $timestamp, $client_string, $this->public_key),
'Content-Type' => 'application/octet-stream'
);
Please sign in to comment.
Something went wrong with that request. Please try again.