Skip to content

Commit 1e76f27

Browse files
committed
1.2.1
1 parent 7b4b3bf commit 1e76f27

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

HISTORY.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1+
1.2.1 / 2017-09-04
2+
==================
3+
* Fixed bug in image downloads (and any url different from `api.discogs.com`)
4+
15
1.2.0 / 2017-06-07
6+
==================
27
* Query parameter is now optional for `database.search()`
38
* Implemented different request limits for authenticated and non-authenticated clients
49

lib/client.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,16 @@ DiscogsClient.prototype.about = function(callback) {
149149

150150
DiscogsClient.prototype._rawRequest = function(options, callback) {
151151
var data = options.data || null,
152-
method = options.method || 'GET',
153-
urlParts = url.parse(options.url),
154-
encoding = options.encoding || 'utf8';
152+
method = options.method || 'GET',
153+
urlParts = url.parse(options.url),
154+
encoding = options.encoding || 'utf8';
155155

156156
// Build request headers
157157
var headers = {
158158
'User-Agent': this.config.userAgent,
159159
'Accept': 'application/json,application/vnd.discogs.' + this.config.apiVersion + '.' + this.config.outputFormat + '+json,application/octet-stream',
160160
'Accept-Encoding': 'gzip,deflate',
161-
'Host': this.config.host,
161+
'Host': urlParts.host || this.config.host,
162162
'Connection': 'close',
163163
'Content-Length': 0
164164
};

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "disconnect",
33
"description": "A full featured Discogs API v2.0 client library",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"keywords": ["discogs", "api", "client", "oauth"],
66
"homepage": "https://github.com/bartve/disconnect",
77
"bugs": "https://github.com/bartve/disconnect/issues",

0 commit comments

Comments
 (0)