Patchwork [1/1] scripts/send-error-report: fetch /Errors/ instead of /.

login
register
mail settings
Submitter Roxana
Date Aug. 4, 2014, 12:16 p.m.
Message ID <fa6233e6804b85850496876aac25009533d9a6e5.1407154577.git.roxana.ciobanu@intel.com>
Download mbox | patch
Permalink /patch/77191/
State Accepted
Commit 6a77a1dd220bf8f8fbaba4fcd6ceca9da27559d2
Headers show

Comments

Roxana - Aug. 4, 2014, 12:16 p.m.
If HTTP_PROXY or http_proxy is set when the send-error-report script
is run, it will check to see if fetching / on the specified server
returns 200 without the proxy set. If it does it will assume that the
proxy is not needed. However this check can never work because
fetching / always redirects to /Errors/ in the current code and
thus returns code 301. This is fixed by fetching /Errors/ instead of /.

[YOCTO #YB6576]

Signed-off-by: Roxana Ciobanu <roxana.ciobanu@intel.com>
---
 scripts/send-error-report | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/scripts/send-error-report b/scripts/send-error-report
index 48d983b..c99d387 100755
--- a/scripts/send-error-report
+++ b/scripts/send-error-report
@@ -20,7 +20,7 @@  def handle_connection(server, data):
         # we need to check that the server isn't a local one, as in no_proxy
         try:
             temp = httplib.HTTPConnection(server, strict=True, timeout=5)
-            temp.request("GET", "/")
+            temp.request("GET", "/Errors/")
             tempres = temp.getresponse()
             if tempres.status == 200:
                 proxyrequired = False