在验证密码时获取“502坏网关:请求端点无法处理”

时间:2015-05-18 09:37:06

标签: java android node.js

在验证node.js中的密码并将响应发送到android客户端时出现上述错误。

任何人都可以检查我的验证码是否正确?

var queryData = url.parse(request.url, true).query;
var Email =  queryData.email;
var Password =  queryData.passwd;
ibmdb.open(dbConnection, function(err, conn) {
    if (err) {
        response.send("error occurred " + err.message);
    }
    else {
        console.log('before select');
        conn.query("SELECT PASSWORD FROM USER02130.USER_DETAILS123 WHERE SHORT_ID='"+Email+"'", function(err,  rows, moreResultSets) {
            if ( !err ) {
    var valid = rows.JSON();
    if (valid.PASSWORD==Password) {
            response.write("Successful login");
                                              }
    else {
       response.write("Invalid Password");
          }

}
else {
       response.write("error occurred " + err.message);
       }
       response.end();
        });
    }
})

1 个答案:

答案 0 :(得分:0)