Deco is not properly closing an http connection to its web-server
Hello there!
I have a weird issue with my Deco router when sending HTTP requests to it.
It always has these headers in the response:
```
Connection: close
Transfer-Encoding: chunked
```
Which is fine, and most of the time everything works as intended: the client receives a correct response and closes the TCP connection.
But sometimes (about 2.5% of requests in my testing), the router starts the response as usual, giving out all the data, but instead of sending the last empty chunk to specify that all the data had been transferred, the router starts to repeatedly send Keep-Alive packets, does it for ~30 seconds, and then closes the connection with a [FIN, ACK] packet.
So the client never receives the empty chunk and thinks that the server closed the connection prematurely, which results in some kind of error on every client that I've tried.
What I have tried:
1. Sending `Connection: close` header from client, hoping that the router won't send Keep-Alive
2. Switching to HTTP 1.0 protocol
3. Rebooting all the routers in my mesh
4. Different client implementations (python requests lib, curl, Bruno)
The behavior persists. Except that while using HTTP 1.0, curl does not expect the empty chunk, and it is not resulting in an error, but it still takes 30 seconds to wait while the server closes the connection to return a response, so it is far from ideal.
I didn't find anything suspicious in the router logs for that matter; however, I have them attached below.
Here is a bash script that I was using for testing:
```
success=0; fail=0; for i in {1..1000}; do echo "Running request $i"; curl --silent --request POST --url 'http://<router_ip>/cgi-bin/luci/;stok=/login?form=keys&operation=read' > /dev/null; rc=$?; ((rc==0?success++:fail++)); done; echo "Success:$success Fail:$fail"
```
Here I have gathered the router logs while this was happening, as well as Wireshark traces of good and bad responses:
https://drive.google.com/drive/folders/1kKIYcusk27JozP3pSsOb7RcQGklFs7zY?usp=sharing
Please tell me if I can help you by providing some more information
Thank you!