diff options
| author | Konstantin Pavlov <thresh@nginx.com> | 2019-09-19 19:04:16 +0300 |
|---|---|---|
| committer | Konstantin Pavlov <thresh@nginx.com> | 2019-09-19 19:04:16 +0300 |
| commit | deb26fa47a9ab1b358938134a8ced8bbc4a083e1 (patch) | |
| tree | 0bedf8829f003fa4c0101e3421b7184acc1c8343 /test/unit/http.py | |
| parent | fcb1f851d0b5d1774a6cb876288ea29cfef58618 (diff) | |
| parent | db777d1e7f607d1b0f01dfb73ad0bac12987202b (diff) | |
| download | unit-deb26fa47a9ab1b358938134a8ced8bbc4a083e1.tar.gz unit-deb26fa47a9ab1b358938134a8ced8bbc4a083e1.tar.bz2 | |
Merged with the default branch.
Diffstat (limited to 'test/unit/http.py')
| -rw-r--r-- | test/unit/http.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/unit/http.py b/test/unit/http.py index c0af8a9e..82a6bd6a 100644 --- a/test/unit/http.py +++ b/test/unit/http.py @@ -12,6 +12,11 @@ class TestHTTP(TestUnit): port = 7080 if 'port' not in kwargs else kwargs['port'] url = '/' if 'url' not in kwargs else kwargs['url'] http = 'HTTP/1.0' if 'http_10' in kwargs else 'HTTP/1.1' + read_buffer_size = ( + 4096 + if 'read_buffer_size' not in kwargs + else kwargs['read_buffer_size'] + ) headers = ( {'Host': 'localhost', 'Connection': 'close'} @@ -94,7 +99,9 @@ class TestHTTP(TestUnit): read_timeout = ( 30 if 'read_timeout' not in kwargs else kwargs['read_timeout'] ) - resp = self.recvall(sock, read_timeout=read_timeout).decode(enc) + resp = self.recvall( + sock, read_timeout=read_timeout, buff_size=read_buffer_size + ).decode(enc) if TestUnit.detailed: print('<<<') @@ -118,6 +125,9 @@ class TestHTTP(TestUnit): def get(self, **kwargs): return self.http('GET', **kwargs) + def head(self, **kwargs): + return self.http('HEAD', **kwargs) + def post(self, **kwargs): return self.http('POST', **kwargs) |
