Skip to content
This repository was archived by the owner on Jan 5, 2019. It is now read-only.

Conversation

@imbstack
Copy link
Contributor

Gotta run now, this is messy, but is what we need to do to fix the broken auth tests.

lib/client.js Outdated
reportStats(true, 'http-' + res.status);
}
if(res.headers['content-type'].indexOf('application/json') === -1 || !res.body){
if((_.includes(res.headers, 'content-type') &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_.includes(res.headers, 'content-type') checks if there is a value called 'content-type', not if there is a key.

Either use _.includes(res.headers['content-type'], 'application/json') or do if (res.headers['content-type'] && res.headers['content-type'].indexOf(...

That's just my guess...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm... maybe I'm reading the docs wrong... Or are we missing some tests, because ideally this should be caught by travis...

@imbstack
Copy link
Contributor Author

Oops, you're totally right. This is the correct fix.

@jonasfj
Copy link
Contributor

jonasfj commented Mar 31, 2016

R+

@djmitche
Copy link
Contributor

djmitche commented Apr 4, 2016

R+! Please land, release a new version, and update tc-tools to use that new version as a minimum.

@imbstack imbstack merged commit 63c43f4 into master Apr 4, 2016
@imbstack imbstack deleted the quickfix branch April 4, 2016 16:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants