Skip to content

Commit

Permalink
Merge pull request #1227 from focusaurus/fix-latest-mime-tests
Browse files Browse the repository at this point in the history
Fix xml tests that broke with mime update
  • Loading branch information
kornelski committed May 24, 2017
2 parents ea35c57 + 0173a9d commit d0ab622
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/client.js
Expand Up @@ -169,7 +169,7 @@ request.parseString = parseString;
request.types = {
html: 'text/html',
json: 'application/json',
xml: 'application/xml',
xml: 'text/xml',
urlencoded: 'application/x-www-form-urlencoded',
'form': 'application/x-www-form-urlencoded',
'form-data': 'application/x-www-form-urlencoded'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -31,7 +31,7 @@
"form-data": "^2.1.1",
"formidable": "^1.1.1",
"methods": "^1.1.1",
"mime": "^1.3.4",
"mime": "^1.3.6",
"qs": "^6.4.0",
"readable-stream": "^2.0.5"
},
Expand Down
2 changes: 1 addition & 1 deletion test/basic.js
Expand Up @@ -360,7 +360,7 @@ describe('request', function(){
.accept('xml')
.end(function(err, res){
try {
res.header['accept'].should.equal('application/xml');
res.header['accept'].should.equal('text/xml');
done();
} catch(e) { done(e); }
});
Expand Down
2 changes: 1 addition & 1 deletion test/request.js
Expand Up @@ -295,7 +295,7 @@ it('request .accept() with xml', function(next){
.accept('xml')
.end(function(err, res){
try {
assert.equal('application/xml', res.text, res.text);
assert.equal('text/xml', res.text, res.text);
next();
} catch(e) { next(e); }
});
Expand Down

0 comments on commit d0ab622

Please sign in to comment.