diff --git a/src/core/core.py b/src/core/core.py index bfe3b0c..e0cfdae 100644 --- a/src/core/core.py +++ b/src/core/core.py @@ -15,6 +15,7 @@ Development Team: Brain Storm Team """ +fVersion = open('VERSION', 'r+').readline().rstrip() CoreConfig = { 'info': { @@ -22,11 +23,11 @@ 'repository': 'git@github.com:stanislav-web/OpenDoor.git', 'remote_version': 'https://raw.githubusercontent.com/stanislav-web/OpenDoor/master/VERSION', 'license': 'License: GNU General Public License', - 'version': '4.0.6', + 'version': fVersion, 'documentation': 'https://opendoor.readthedocs.org', 'required_versions': { 'minor': '3.7', - 'major': '3.10' + 'major': '3.11' }, }, 'data': { diff --git a/src/core/http/providers/header.py b/src/core/http/providers/header.py index f2c8ee1..ed7b285 100644 --- a/src/core/http/providers/header.py +++ b/src/core/http/providers/header.py @@ -47,8 +47,8 @@ def add_header(self, key, value): :param str value: header value :return: HeaderProvider """ - - self.__headers.add(key.strip(), value.strip()) + + self.__headers.update({key.strip(): value.strip()}) return self @property @@ -60,12 +60,12 @@ def _headers(self): origin = ''.join([self.__cfg.scheme, self.__cfg.host]) referer = ''.join([self.__cfg.scheme, self.__cfg.host]) + ':' + str(self.__cfg.port) - self.add_header('Accept', self._accept)\ - .add_header('Accept-Encoding', self._accept_encoding)\ + self.add_header('Accept', self._accept) \ + .add_header('Accept-Encoding', self._accept_encoding) \ .add_header('Accept-Language', self._accept_language) \ - .add_header('Origin', origin)\ - .add_header('Referer', referer)\ - .add_header('Cache-Control', self._cache_control)\ - .add_header('Upgrade-Insecure-Requests', '1')\ + .add_header('Origin', origin) \ + .add_header('Referer', referer) \ + .add_header('Cache-Control', self._cache_control) \ + .add_header('Upgrade-Insecure-Requests', '1') \ .add_header('Pragma', 'no-cache') return self.__headers diff --git a/tests/test_lib_browser_debug.py b/tests/test_lib_browser_debug.py index a0261a0..6d7338f 100644 --- a/tests/test_lib_browser_debug.py +++ b/tests/test_lib_browser_debug.py @@ -86,7 +86,7 @@ def test_debug_list(self): def test_debug_connection_pool(self): """ Debug.debug_connection_pool() test """ - self.assertTrue(self.debug.debug_connection_pool('http_pool_start', '')) + self.assertTrue(self.debug.debug_connection_pool('http_pool_start', '', '')) def test_debug_proxy_pool(self): """ Debug.debug_proxy_pool() test """