proxy??

  • Thread starter Jorge Alberto Diaz Orozco
  • Start date
J

Jorge Alberto Diaz Orozco

Hi there.
Does anyone knows how to manage headers using a simple proxy???
I'm doing this but It gives me problems In some pages.

import SocketServer
import SimpleHTTPServer
import urllib2

PORT = 8888

class Proxy(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_GET(self):
try:
print self.path
self.copyfile(urllib2.urlopen(self.path), self.wfile)
except:
print 'error',self.path

httpd = SocketServer.ForkingTCPServer(('127.0.0.1', PORT), Proxy)
print "serving at port", PORT
httpd.serve_forever()

10mo. ANIVERSARIO DE LA CREACION DE LA UNIVERSIDAD DE LAS CIENCIAS INFORMATICAS...
CONECTADOS AL FUTURO, CONECTADOS A LA REVOLUCION

http://www.uci.cu
http://www.facebook.com/universidad.uci
http://www.flickr.com/photos/universidad_uci
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,696
Latest member
BarbraOLog

Latest Threads

Top