I have a Python script which handle HTTP requests on port 8067. It works when I run it from the command line, but if I load it from XChat, it doesn't answer the requests
Wireshark shows me FireFox sends headers on this port, but the script doesn't answer.
Here is a port of the code :
- Code: Select all
class WebHandler(BaseHTTPServer.BaseHTTPRequestHandler):
do_GET():
print "foo" # Doesn't print anything when the script is loaded by XChat
import threading, BaseHTTPServer
httpd = BaseHTTPServer.HTTPServer(('', 8067), XChatWebHandler)
threading.Thread(target=httpd.serve_forever, name="XChat Web Frontend server")
Do you know the cause of the bug ?
Thank you in advance,
ProgVal