tempesta-tech / tempesta-test

Test suite for Tempesta FW
11 stars 4 forks source link

deproxy doesn't handle trailers with -T option #465

Open RomanBelozerov opened 1 year ago

RomanBelozerov commented 1 year ago

Tempesta sends request and trailers separately if -T option is enabled. For request (dbg 6 for test t_frang.test_http_trailer_split_allowed.FrangHttpTrailerSplitLimitOnTestCase.test_accepted_request):

GET / HTTP/1.1
Host: debian
Transfer-Encoding: gzip, chunked
X-Forwarded-For: 127.0.0.1
via: 1.1 tempesta_fw (Tempesta FW pre-0.7.0)
Connection: keep-alive

4
test
0
HdrTest: testVal
  1. Tempesta receives request without trailers and forwards it to server.
  2. DeproxyServer receives request without trailers and parses it.
    
    Deproxy: SrvConnection: Receive request.
    GET / HTTP/1.1
    Host: debian
    Transfer-Encoding: gzip, chunked
    X-Forwarded-For: 127.0.0.1
    via: 1.1 tempesta_fw (Tempesta FW pre-0.7.0)
    Connection: keep-alive

4 test 0

3. DeproxyServer send response
```python
Deproxy: SrvConnection: Send response.
b'HTTP/1.1 200 OK\r\nContent-Length: 0\r\nConnection: keep-alive\r\n\r\n'
  1. Tempesta receives trailers and forwards them to server.
        Deproxy: SrvConnection: Receive data.
    HdrTest: testVal
  2. DeproxyServer recieves error
    Deproxy: SrvConnection: Can't parse message
    <<<<<
    HdrTest: testVal
    >>>>>

Please add: