Project

General

Profile

Bug #681

GeneralProxyError 'bad input' when using a proxy

Added by Anonymous about 10 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
02/11/2014
Due date:
% Done:

0%


Description

Using a proxy causes the error:

An error occurred when attempting to communicate with the proxy
Traceback (most recent call last):
  File "/opt/splunk/shared/etc/apps/website_monitoring/bin/web_ping.py", line 255, in ping
    response, content = http.request(url.geturl(), 'GET')
  File "/opt/splunk/lib/python2.7/site-packages/httplib2/__init__.py", line 1421, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/opt/splunk/lib/python2.7/site-packages/httplib2/__init__.py", line 1171, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/opt/splunk/lib/python2.7/site-packages/httplib2/__init__.py", line 1122, in _conn_request
    conn.connect()
  File "/opt/splunk/lib/python2.7/site-packages/httplib2/__init__.py", line 887, in connect
    sock.connect((self.host, self.port))
  File "/opt/splunk/lib/python2.7/site-packages/httplib2/socks.py", line 360, in connect
    raise GeneralProxyError((5, _generalerrors[5]))
GeneralProxyError: (5, 'bad input')

See http://answers.splunk.com/answers/121798/website-monitoring-app-generating-python-error-when-using-http-proxy

History

#1 Updated by Luke Murphey about 10 years ago

This looks like this problem: https://code.google.com/p/httplib2/issues/detail?id=179

Might be avoidable by ensuring the input is a plain string, not Unicode.

#3 Updated by Luke Murphey about 10 years ago

I cannot reproduce the error. I tried:

  1. Forcing the URL to unicode: response, content = http.request( unicode(url.geturl()), 'GET')
  2. Using a unicode URL (http://LukeMurphey.net/Tree_ασ)
  3. Using a unicode domain name (causes an error but not the error that the user observed)

#4 Updated by Luke Murphey about 10 years ago

  • Status changed from New to In Progress

#5 Updated by Luke Murphey almost 10 years ago

  • Status changed from In Progress to Closed

#6 Updated by Luke Murphey almost 8 years ago

I have seen this happen when SSL is used but not when plain text is used.

Also available in: Atom PDF