Changaco / python-etherpad_lite

Python interface for Etherpad-Lite's HTTP API
15 stars 6 forks source link

Etherpad behind reverse proxy #4

Closed dpellow closed 10 years ago

dpellow commented 10 years ago

Does this interface work when etherpad is setup as described here: https://github.com/ether/etherpad-lite/wiki/How-to-put-Etherpad-Lite-behind-a-reverse-Proxy#with-ssl-enabled-requiring-authentication-and-allowing-nice-urls

I have followed the directions there on setting up etherpad behind a reverse proxy with apache, ssl, and requiring authentication. When I try to follow the simple usage example here

$ python -m etherpad_lite -p apikey=secret_from_APIKEY.txt
% createPad padID=test text="Lorem ipsum dolor sit amet."

I get the following error:

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/lib/python2.7/dist-packages/etherpad_lite/__main__.py", line 67, in <module>
    print(c(cmd, **params) or 'ok')
  File "/usr/local/lib/python2.7/dist-packages/etherpad_lite/__init__.py", line 34, in __call__
    r = json.loads(urlopen(url, data, self.timeout).read().decode('utf-8'))
  File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
    return _opener.open(url, data, timeout)
  File "/usr/lib/python2.7/urllib2.py", line 401, in open
    response = self._open(req, data)
  File "/usr/lib/python2.7/urllib2.py", line 419, in _open
    '_open', req)
  File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
    result = func(*args)
  File "/usr/lib/python2.7/urllib2.py", line 1211, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
    r = h.getresponse(buffering=True)
  File "/usr/lib/python2.7/httplib.py", line 1034, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 407, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 371, in _read_status
    raise BadStatusLine(line)
httplib.BadStatusLine: ''

Is there something that I need to modify or a different command line parameter that I need to use that will let me do this?