admin管理员组

文章数量:1123922

I am writing a web application where the web server will give the client a token on the first reqeust and expect the same client to return the token in subsequent requests (within a single webpage request). I am thinking to tie the token to the IP address of the client who requested it, but this will not work if the client uses a HTTP Proxy, as client A can give its token to client B, while both clients share the Proxy's IP.

I wonder if the web server includes the Connection:keep-alive header, will the HTTP Proxy keep the session open and allow multple requests sent from the same session? If this is the case, then if the client returning the token is the same client who requested it, both requests should arrive at my web server from the same port; and if who requested the token and who is returning the token are different clients, then the first and second requests should have two different ports. Is this assumption correct?

本文标签: How does a HTTP Proxy react to Connection keepalive response headerStack Overflow