]> www.vanbest.org Git - motioneye-debian/commitdiff
fixed double slashes problem in remote motionEye cameras
authorCalin Crisan <ccrisan@gmail.com>
Sun, 12 Apr 2015 09:01:11 +0000 (12:01 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Sun, 12 Apr 2015 09:01:11 +0000 (12:01 +0300)
doc/requirements.txt [deleted file]
src/remote.py

diff --git a/doc/requirements.txt b/doc/requirements.txt
deleted file mode 100644 (file)
index 9a71525..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-python>=2.6
-tornado
-jinja2
-pil
-
-ffmpeg
-motion
-v4l-utils
-cifs-utils
index 92b91f638061114f692a38f08be95916fe659855..6dc4feb053535c366b3e4a0d92ee1be8c9dd0ab7 100644 (file)
 import functools
 import json
 import logging
+import re
 
 from tornado.httpclient import AsyncHTTPClient, HTTPRequest
 
 import settings
 import utils
 
+_DOUBLE_SLASH_REGEX = re.compile('//+')
+
 
 def _make_request(host, port, username, password, uri, method='GET', data=None, query=None, timeout=None):
+    uri = _DOUBLE_SLASH_REGEX.sub('/', uri)
     url = '%(scheme)s://%(host)s%(port)s%(uri)s' % {
             'scheme': 'http',
             'host': host,