Import Upstream version 4.12.4

This commit is contained in:
geos_one
2025-08-12 22:28:56 +02:00
parent 03a8170b15
commit 9181ee2487
1629 changed files with 874094 additions and 554378 deletions

View File

@@ -36,7 +36,7 @@ class Unauthorized_HTTP_test:
content_type = 'application/x-www-form-urlencoded'
accept_language = 'en-us'
def send_request(self, method='POST', params=None):
def send_request(self, method='POST', params=None, host=None):
"""
Send a request to HTTP server
@@ -44,10 +44,11 @@ class Unauthorized_HTTP_test:
"""
if params is not None:
if self.content_type == 'application/x-www-form-urlencoded':
# urlencode *can* take two arguments
# pylint: disable=too-many-function-args
params = urllib.parse.urlencode(params, True)
url = 'https://' + self.host + self.app_uri
if host:
url = 'https://' + host + self.app_uri
else:
url = 'https://' + self.host + self.app_uri
headers = {'Content-Type': self.content_type,
'Accept-Language': self.accept_language,