]> www.vanbest.org Git - motioneye-debian/commitdiff
fixed digest stream authentication
authorCalin Crisan <ccrisan@gmail.com>
Sat, 31 Oct 2015 18:55:40 +0000 (20:55 +0200)
committerCalin Crisan <ccrisan@gmail.com>
Sat, 31 Oct 2015 18:55:40 +0000 (20:55 +0200)
motioneye/mjpgclient.py
motioneye/motionctl.py
motioneye/utils.py

index 949e599053c1aca6bc2feafc85161f997140a2f1..db856296ce0c82cb114ce83654d9deb9efce5f7e 100644 (file)
@@ -113,12 +113,7 @@ class MjpgClient(IOStream):
         logging.debug('mjpg client for camera %(camera_id)s connected on port %(port)s' % {
                 'port': self._port, 'camera_id': self._camera_id})
         
-        if self._username:
-            auth_header = utils.build_basic_header(self._username, self._password)
-            self.write('GET / HTTP/1.0\r\n\r\nAuthorization: %s\r\n\r\n' % auth_header)
-            
-        else:
-            self.write('GET / HTTP/1.0\r\n\r\n')
+        self.write('GET / HTTP/1.0\r\n\r\n')
 
         self._seek_http()
 
index 39265ca8b18d01a98721aa36dfdecb65df1b6a09..db1110947cf8d55a94c6fbe11c0c941c522264cd 100644 (file)
@@ -218,7 +218,7 @@ def get_motion_detection(camera_id, callback):
     
     def on_response(response):
         if response.error:
-            return callback(error=utils.pretty_http_error())
+            return callback(error=utils.pretty_http_error(response))
 
         enabled = bool(response.body.lower().count('active'))
         
index 2b892259649eb985d3ede2d3806ec90f8b211ed3..27ae864144cf8eb3f222494145fc2b0edea9a164 100644 (file)
@@ -665,7 +665,7 @@ def build_digest_header(method, url, username, password, state):
 
     last_nonce = nonce
 
-    base = 'username="%s", realm="%s", nonce="%s", path="%s", ' \
+    base = 'username="%s", realm="%s", nonce="%s", uri="%s", ' \
            'response="%s"' % (username, realm, nonce, path, respdig)
     if opaque:
         base += ', opaque="%s"' % opaque