My 2 cents.
Modifying the registry and then restoring is not a great idea. I can see
why you are doing it but I'd encourage you to NOT do this. There is a
potential here for a background web app to fail (e.g. web browser based
IM tool).
I'd be tempted to monkey patch urllib(2), presumably that is the beast
causing the issue here if you want a quick solution. Either monkey patch
urllib OR monkey patch _winreg lookup that urllib relies on.
As the "real" Chris said, improving postreview and getting the code into
the main git repo is the ideal solution here. You may be the first to
hit this but you are not going to be the last :-) so it it would be good
to get a more robust solution.
Chris
Christian Hammond wrote:
> Yeah, modifying postreview.py isn't ideal. It was just one suggestion.
> What I'd like to see, I think, is an optional configuration variable
> in the user's .reviewboardrc that allows users to control
> post-review's proxy settings manually.
>
> Christian
>
> --
> Christian Hammond -
chi...@chipx86.com <mailto:
chi...@chipx86.com>
> <mailto:
chip...@chipx86.com>> wrote:
> > Is the Review Board server on HTTP or HTTPS?
> >
> > It sounds like custom code would need to be added to
> specifically disable
> > the proxy server. It's also possible that a 2.6 release would
> fix this
> > issue, but I don't know.
> >
> > If you were to modify postreview.py , you could try adding some
> code like:
> >
> > proxy_support = urllib2.ProxyHandler({})
> > opener = urllib2.build_opener(proxy_support)
> > urllib2.install_opener(opener)
> >
> > in ReviewBoardServer.__init__ probably at the end.
> >
> > Christian
> >
> > --
> > Christian Hammond -
chip...@chipx86.com <mailto:
chip...@chipx86.com>
> > Review Board -
http://www.reviewboard.org
> > VMware, Inc. -
http://www.vmware.com
> >
> >
> >
> > On Tue, Nov 24, 2009 at 4:30 PM, Akhilesh
> <
akhileshjo...@gmail.com <mailto:
akhileshjo...@gmail.com>> wrote:
> > > Thanks Christian. I tried setting http_proxy environment
> variable to
> > > empty string but Windows wouldn't allow me. I set it to " " (with
> > > space) - but as expected it didn't work.
> >
> > > Is there any work-around? The problem is that one of the sites
> in our
> > > organization uses proxy and all developers from that site have to
> > > toggle Proxy settings to access Reviewboard/Internet as
> by-pass proxy
> > > option is not working for them.
> >
> > > I appreciate any help. I'm ready to test private code for
> post-review
> > > as well if needed.
> >
> > > Regards,
> > > Akhilesh
> >
> > > On Nov 24, 1:57 pm, Christian Hammond <
chip...@chipx86.com
> <mailto:
chip...@chipx86.com>> wrote:
> > > > Sadly, this is due to Python's usage of the system proxy
> settings. I'd
> > > have
> > > > to see if there's anything we can do for this. On Linux, I
> know you can
> > > set
> > > > the HTTP_PROXY variable to an empty string to work around
> it, but I doubt
> > > > that works on Windows...
> >
> > > > Christian
> >
> > > > --
> > > > Christian Hammond -
chip...@chipx86.com
> <mailto:
chip...@chipx86.com>
> <
akhileshjo...@gmail.com <mailto:
akhileshjo...@gmail.com>>
> <
http://Server.Company.Com> <<==Replaced
> > > > > <LI id=L_10060_15>Source: Firewall
> > > > > </UL>
> > > > > </TD>
> > > > > </TR>
> > > > > </TBODY>
> > > > > </TABLE>
> > > > > </BODY>
> > > > > </HTML>
> >
> > > > > Unable to accesshttp://
10.0.3.83/api/json/accounts/login/
> <
http://10.0.3.83/api/json/accounts/login/>. The host
> > > > > path may be
> > > > > invalid
> > > > > HTTP Error 504: Proxy Timeout ( The connection timed out.
> For more
> > > > > information a
> > > > > bout this event, see ISA Server Help. )
> >
> > > > > --
> > > > > Want to help the Review Board project? Donate today at
> > > > >
http://www.reviewboard.org/donate/
> > > > > Happy user? Let us know
> athttp://
www.reviewboard.org/users/
> <mailto:
reviewboard%2Bunsu...@googlegroups.com><reviewboard%2Bunsubscribe@googlegr
>
oups.com <
http://oups.com>>
> > > <reviewboard%2Bunsubscribe@googlegr
oups.com <
http://oups.com>>
> <mailto:
reviewboard%2Bunsu...@googlegroups.com><reviewboard%2Bunsubscribe@googlegr
>
oups.com <
http://oups.com>>
> <mailto:
reviewboard%2Bunsu...@googlegroups.com>