[Tutor] How do you simulate a CGI script locally?

Magnus Lycka magnus@thinkware.se
Sat Dec 14 19:12:25 2002


At 10:07 2002-12-14 -0700, Bob Gailer wrote:
>Monitoring the server window and using telnet, it takes about 12 seconds 
>for the server to see the request and another 12 to get the response back 
>in the telnet window.

:( For me, running Win2k on a 700MHz Duron it takes about 1 second
to get the blank screen with telnet, and when I type "GET /[enter][enter]"
I get an immediate response from my web server program which is derived
from the Python web server classes.

>Tracert shows one hop.

Sounds like a local address...

I'm not sure what is happening, if it tries to connect to some network
server to check things up before doing anything on the network, or what.
I'm pretty sure the delay don't have anything to do with Python if it's
not the execution of the script itself that is so slow.

What happens if you just run the script on its own? (You might need to
set up some environment variables to simulate the environment of the
web server.)


-- 
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/  mailto:magnus@thinkware.se