sholden at holdenweb.com
Wed Aug 1 01:30:35 CEST 2001
"Adonis Vargas" <deltapigz at telocity.com> wrote in message
news:3B6737BE.2CCC0A1A at telocity.com...
> how come this code does not seem to popup on any broswer i attempt to
> send HTML data to:
> (c, a) = s.accept()
> c.send('HTTP 200 OK\n')
Strictly according to the protocol that should be "HTTP/1.0 200 OK" or some
other string including a version.
> c.send('Content-Type: text/html\n')
> print RED + "CONNECT->%s"%a + RESET
> d = c.recv(256)
At the moment the browser has the HTTP headers winging their way towards it,
with no terminating blank line. What are you expecting to receive? Since the
browser won't close the socket either (it's still waiting for the
termination of the headers) it won't close its end of the socket either, so
your program stops here. Only for an hour or two while the connection times
out, though 8-)
> <META http-equiv="refresh" content="0;
> *basic idea to redirect a broswer.
> any help would greatly be appreciated.
Does this help?
More information about the Python-list