Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2016-05-20 05:17:30 +0300
committerFeross Aboukhadijeh <feross@feross.org>2016-05-20 05:17:30 +0300
commit101fdb7a46593e3abad7517bfee77ce40f30316c (patch)
tree0b4ae0c060617971c3a2daa1b2ed86bfa35b589c /lib/webconn.js
parentee5dab1fe0c4f0ffde4d3ed14ea53926e8b83522 (diff)
Make user agent strings consistent
Diffstat (limited to 'lib/webconn.js')
-rw-r--r--lib/webconn.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/webconn.js b/lib/webconn.js
index a45ca68..3507241 100644
--- a/lib/webconn.js
+++ b/lib/webconn.js
@@ -7,6 +7,8 @@ var inherits = require('inherits')
var sha1 = require('simple-sha1')
var Wire = require('bittorrent-protocol')
+var VERSION = require('./package.json').version
+
inherits(WebConn, Wire)
/**
@@ -112,7 +114,7 @@ WebConn.prototype.httpRequest = function (pieceIndex, offset, length, cb) {
url: url,
method: 'GET',
headers: {
- 'user-agent': 'WebTorrent (http://webtorrent.io)',
+ 'user-agent': 'WebTorrent/' + VERSION + ' (https://webtorrent.io)'
'range': 'bytes=' + start + '-' + end
}
}