为什么' socket.handshake.headers [' x-forwarded-for'] || socket.handshake.address'导致2个IP地址?

时间:2018-05-04 03:31:30

标签: socket.io ip x-forwarded-for

我使用 string CommandStr = "BFN_HASH_PASSWORD"; using (OracleConnection conn = new OracleConnection(oradb)) using (OracleCommand cmd = new OracleCommand(CommandStr, conn)) { cmd.CommandType = CommandType.StoredProcedure; cmd.BindByName = true; cmd.Parameters.Add("V_INPASSWD",OracleDbType.Varchar2,ParameterDirection.Input); cmd.Parameters["V_INPASSWD"].Value = "test"; cmd.Parameters["V_INPASSWD"].Size = 1000; cmd.Parameters.Add("V_OUTPASSWD", OracleDbType.Varchar2,ParameterDirection.ReturnValue); cmd.Parameters["V_OUTPASSWD"].Size = 1000; conn.Open(); cmd.ExecuteNonQuery(); string output = (string)cmd.Parameters["V_OUTPASSWD"].Value.ToString(); MessageBox.Show("hash pass:"+ output); MessageBox.Show("hash pass:" + cmd.Parameters["V_INPASSWD"].Value.ToString()); } 获取IP地址:

socket.io

ip变量的值设置为:" 124.202.182.82,100.116.251.26"

为什么arr的最后一个元素中有两个IP地址?

1 个答案:

答案 0 :(得分:0)

调用:时,您已经使用,作为分隔符而不是split()

X-Forwarded-For标头中的地址用逗号分隔。

More information about X-Forwarded-For on MDN