Gabriel Genellina <gagsl-...@yahoo.com.ar> added the comment: > > 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* ...
If you had configured a proxy at localhost:8000, and *also* a Trac instance at that port, and Trac had "won the race" for the port, then you would observe exactly the symthoms you describe. That is, urllib talking to 8000 as it were a proxy, and the Trac instance actually there getting confused. Your patch, as you surely understand now, is not correct; in fact, the code is OK as it is. urllib builds the request in that specific way *because* he thinks there is a proxy. If the proxy is buggy, misconfigured, or inexistent, it's not the library's fault :) -- Gabriel Genellina > > 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> > _______________________________________ Yahoo! Cocina Recetas prácticas y comida saludable http://ar.mujer.yahoo.com/cocina/ _______________________________________ 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