mirror of
https://github.com/donl/slouch.git
synced 2026-06-30 06:11:57 -06:00
return full response for HEAD
This commit is contained in:
parent
840e866e80
commit
7ed5ce61de
1 changed files with 2 additions and 2 deletions
|
|
@ -126,8 +126,8 @@ EnhancedRequest.prototype._request = function (opts) {
|
|||
// Sometimes CouchDB just returns an malformed error
|
||||
if (!response || !response.body) {
|
||||
if (response && opts.method === 'HEAD') {
|
||||
// or we only want the response headers
|
||||
return response.headers;
|
||||
// or we only want the response/headers
|
||||
return response;
|
||||
}
|
||||
err = new Error('malformed body');
|
||||
err.error = 'malformed body';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue