diff --git a/server.js b/server.js index f6958dae53a93..92e2eeecc2510 100644 --- a/server.js +++ b/server.js @@ -295,7 +295,7 @@ cache(function(data, match, sendBadge, request) { uri: 'https://api.travis-ci.org/' + userRepo + '.svg', }; if (branch != null) { - options.path += '?branch=' + branch; + options.uri += '?branch=' + branch; } var badgeData = getBadgeData('build', data); request(options, function(err, res) {