tempesta-tech / tempesta-test

Test suite for Tempesta FW
10 stars 4 forks source link

Malformed response from deproxy server. #625

Closed enuribekov-tempesta closed 1 week ago

enuribekov-tempesta commented 3 weeks ago

During creating test for health monitoring CRC calculation was found following:

Server configuration:

{
        "id": "deproxy",
        "type": "deproxy",
        "port": "8080",
        "response": "static",
        "response_content": "HTTP/1.1 200 OK\r\n\r\n",
}

Tempesta health check configuration:

          health_check hm0 {
                request     "GET / HTTP/1.1\r\n\r\n";
                request_url "/";
                resp_code   200;
                resp_crc32    auto;
                timeout     1;
            }

Server answers on HM requests with a string specified in response content, but Wireshark does not detect it as a HTTP and represent as a trivial TCP data segment. Tempesta response parser also detect this data as a single chunck and switch to T_POSTPONE mode waiting for continuation which will never received.

enuribekov-tempesta commented 1 week ago

Not a framework issue. Server response_content field should explicitly contains header Content-Length: 0

       {
            "id": "deproxy",
            "type": "deproxy",
            "port": "8080",
            "response": "static",
            "response_content": "HTTP/1.0 200 OK\r\nContent-Length: 0\r\n\r\n",
        },