Skip to content

Commit 007de68

Browse files
authored
Add Transfer-Encoding chunked header (#496)
* Add Transfer-Encoding chunked header * Fix unit tests
1 parent 4786932 commit 007de68

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plugins/httpapi/dcnm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
class HttpApi(HttpApiBase):
6666
def __init__(self, *args, **kwargs):
6767
super(HttpApi, self).__init__(*args, **kwargs)
68-
self.headers = {"Content-Type": "application/json"}
68+
self.headers = {"Content-Type": "application/json", 'Transfer-Encoding': 'chunked'}
6969
self.urlencoded_headers = {"Content-Type": "application/x-www-form-urlencoded"}
7070
self.txt_headers = {"Content-Type": "text/plain"}
7171
self.version = None

tests/unit/plugins/httpapi/test_dcnm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_init_default_values(self, mock_connection):
5454
"""Test that HttpApi initializes with correct default values."""
5555
http_api = HttpApi(mock_connection)
5656

57-
assert http_api.headers == {"Content-Type": "application/json"}
57+
assert http_api.headers == {"Content-Type": "application/json", 'Transfer-Encoding': 'chunked'}
5858
assert http_api.txt_headers == {"Content-Type": "text/plain"}
5959
assert http_api.version is None
6060
assert http_api.retrycount == 5

0 commit comments

Comments
 (0)