diff --git a/testenv/README b/testenv/README index cf22f894..50baf3d6 100644 --- a/testenv/README +++ b/testenv/README @@ -184,7 +184,8 @@ This section lists the currently supported File Rules and their structure. * SendHeader : This list of Headers will be sent in EVERY response to a request for the respective file. It follows the same value format as - ExpectHeader. + ExpectHeader. Additionally you can specify a list of strings as
+ if you want the header repeated with multiple values. * Response : The HTTP Response Code to send to a request for this File. The value is an Integer that represents a valid HTTP Response Code. diff --git a/testenv/server/http/http_server.py b/testenv/server/http/http_server.py index 2356f1c2..85769c43 100644 --- a/testenv/server/http/http_server.py +++ b/testenv/server/http/http_server.py @@ -191,7 +191,11 @@ class _Handler(BaseHTTPRequestHandler): self.send_cust_headers() try: for keyword, value in self._headers_dict.items(): - self.send_header(keyword, value) + if isinstance(value, list): + for value_el in value: + self.send_header(keyword, value_el) + else: + self.send_header(keyword, value) # Clear the dictionary of existing headers for the next request self._headers_dict.clear() except AttributeError: