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()
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'))
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