Python basehttpserver not serving requests properly
问题 I'm trying to write down a simple local proxy for javascript: since I need to load some stuff from javascript within a web page, I wrote this simple daemon in python: import string,cgi,time from os import curdir, sep import urllib import urllib2 from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer class MyHandler(BaseHTTPRequestHandler): def fetchurl(self, url, post, useragent, cookies): headers={"User-Agent":useragent, "Cookie":cookies} url=urllib.quote_plus(url, ":/?.&-=") if post: