Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

say I have a JSP-script on a server that's called from the browser. This script internally calls another source to get some data.

This internal source is a script that's on the same machine. I

s it possible to do a simple HTTP-GET-Request to that script or does the HTTP-request "leave" the current machine and "returning" to it again (so that it's possible to see/manipulate that request from outside) or is the request handled totally within the current server?

share|improve this question
add comment

4 Answers

up vote 1 down vote accepted

If the request is initiated from the same machine to the same machine, it will not leave it and will be handled locally. In other words, it's not possible to snoop it from the outside.

share|improve this answer
    
But it's not a matter of server configuration? In other words, with a common server installation it's always handled locally? –  acme Feb 2 '10 at 10:53
    
yup, it's tcp stack thing –  rytis Feb 2 '10 at 15:47
add comment

as already mentioned the connection is not leaving the server. but you should try to avoid using the http request for performance/design/... reasons. when the source is in the same app/webserver, you should access it directly without doing the detour over http.

share|improve this answer
    
Ok, thanks you! –  acme Feb 2 '10 at 14:32
add comment

It is completely acceptable. Things like edge-side includes, webhooks, and Deliverance encourage using http for integration.

To be sure the internal request won't appear on the network, you can bind both the internal source's listener socket and the server's client socket to 127.0.0.1.

share|improve this answer
    
Indeed. Traffic on 127.0.0.1 never leaves the machine - it's a completely virtual interface. –  Piskvor Feb 2 '10 at 11:41
add comment

If the server has bound a socket to the local network interface then this should be easy.

share|improve this answer
    
So it depends on the server configuration and is not always the case? –  acme Feb 2 '10 at 10:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.