From 9ea0c39279ed90fb3458ccefc2db3ace14f96ae3 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Mon, 4 Nov 2013 10:34:42 -0800 Subject: [PATCH] Forcing requests to ycmd to ignore local proxies Fixes #641 --- python/ycm/youcompleteme.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python/ycm/youcompleteme.py b/python/ycm/youcompleteme.py index 05704b63..7b96769c 100644 --- a/python/ycm/youcompleteme.py +++ b/python/ycm/youcompleteme.py @@ -41,6 +41,15 @@ try: except ImportError: USE_ULTISNIPS_DATA = False +# We need this so that Requests doesn't end up using the local HTTP proxy when +# talking to ycmd. Users should actually be setting this themselves when +# configuring a proxy server on their machine, but most don't know they need to +# or how to do it, so we do it for them. +# Relevant issues: +# https://github.com/Valloric/YouCompleteMe/issues/641 +# https://github.com/kennethreitz/requests/issues/879 +os.environ['no_proxy'] = '127.0.0.1,localhost' + SERVER_CRASH_MESSAGE_STDERR_FILE = 'The ycmd server SHUT DOWN with output:\n' SERVER_CRASH_MESSAGE_SAME_STDERR = ( 'The ycmd server shut down, check console output for logs!' )