Olemis Lang <ole...@gmail.com> added the comment: Actually I am using a proxy hosted in some other machine (i.e. not my PC ... sorry, I didnt mention :S ...) I «debugged» urllib and, when branching at this point (see below ;) in URLopener.open_http :
{{{ #!python # urllib,py def open_http(self, url, data=None): """Use HTTP protocol.""" import httplib user_passwd = None proxy_passwd= None if isinstance(url, str): # Branching here !!!!!!!!!! host, selector = splithost(url) if host: user_passwd, host = splituser(host) host = unquote(host) realhost = host else: host, selector = url }}} url variable is bound to the following binary tuple {{{ #!python ('172.18.2.7:3128', 'http://localhost:8000/trac-dev') }}} My IP is 172.18.2.99 ... so the `else` branch is the one being executed If you need further details ... dont hesitate and ask anything you want ;) PD: What d'u mean when you said? > Do you have an HTTP proxy? running at the *same* port? (!) I dont understand this since *I already said* that *I accessed* my Trac environment using my web browser (Opera 9.63, I dont know whether this is relevant at all ... ), *I sent you* the lines outputted by tracd to stdout (or stderr ... I am not very sure right now ... ;) and *I told you* that, once I applied the path *I submitted*, everything was *back to normal* ... I dont understand how could all this be possible if I were running tracd and an HTTP proxy in the *same* port, or even in case `http_proxy` envvar be set to the hostname + port where my Trac instance is listening for incoming connections ... Anyway ... CMIIW ... I also checked that immediately before executing the following statements ... {{{ #!python # urllib,py h = httplib.HTTP(host) if data is not None: h.putrequest('POST', selector) h.putheader('Content-Type', 'application/x-www-form- urlencoded') h.putheader('Content-Length', '%d' % len(data)) else: h.putrequest('GET', selector) }}} ... `selector` is bound to 'http://localhost:8000/trac-dev' ... BTW the `else` clause *is the one executed* in this case, and this is consistent with tracd reports *I sent before* and is logical since `data` arg *is missing* in the code snippet I sent before. _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5072> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com