Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #33623 > unrolled thread
| Started by | Jorge Alberto Diaz Orozco <jaorozco@estudiantes.uci.cu> |
|---|---|
| First post | 2012-11-20 09:48 -0500 |
| Last post | 2012-11-20 09:48 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
proxy?? Jorge Alberto Diaz Orozco <jaorozco@estudiantes.uci.cu> - 2012-11-20 09:48 -0500
| From | Jorge Alberto Diaz Orozco <jaorozco@estudiantes.uci.cu> |
|---|---|
| Date | 2012-11-20 09:48 -0500 |
| Subject | proxy?? |
| Message-ID | <mailman.60.1353422916.29569.python-list@python.org> |
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
Back to top | Article view | comp.lang.python
csiph-web