java ee - HttpServletRequest.getRemotePort() -


How can a possible seller implementation of HttpServletRequest.getRemotePort () port remote? Is the actual request sent? I can not see a request header like "client-port", "request-port" or the like.

The web server receives the client's request using the general mechanism of TCP / IP client host And the port is between information available at that level. After the connection is established, the server packs it into the information of the request sent to your program.

The client does not send its port number, and even if this happens, it would be of suspicious value because it would be very easy for misunderstood fake port numbers by TCP / IP stack It is sent as part of the packet.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -