Skip to content

Commit

Permalink
connect content-type upgrade fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cadorn committed Jun 8, 2012
1 parent b1a5991 commit bba58ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins-server/cloud9.connect/connect-plugin.js
Expand Up @@ -42,7 +42,7 @@ module.exports = function startup(options, imports, register) {
if (buildVersion !== false) {
res.setHeader("x-build-version", buildVersion);
}
if(req.method === "POST" && req.headers["content-type"].indexOf("text/plain") === 0) {
if(req.method === "POST" && typeof req.headers["content-type"] === "string" && req.headers["content-type"].indexOf("text/plain") === 0) {
req.headers["content-type"] = "application/x-www-form-urlencoded";
}
next();
Expand Down

0 comments on commit bba58ae

Please sign in to comment.