Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge torrust#866: Add timeout for time waiting for the first HTTP tr…
…acker request 23d5e5e fix: [torrust#613] add timeout for time waiting for the first HTTP tracker request (Jose Celano) Pull request description: This adds a timeout to the HTTP tracker for the time the server waits for the first request from the client after opening a new HTTP connection. It also adds a tower middleware for timeouts in requests. To test the first case, you can open a connection to the API without sending any request with: ```output telnet 127.0.0.1 7070 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. ``` After 5 seconds you will see: ```output Connection closed by foreign host. ``` The current implementation for the first timeout does not send a [408 Request Timeout](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) message. [It seems it is also a common practice](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408). For advanced manual testing, you can use https://github.com/josecelano/axum-server-timeout ACKs for top commit: josecelano: ACK 23d5e5e Tree-SHA512: a348141c1c0cb8a0b5ffd6537fe3cc3793038afba0a4bae30ad806f8fd45d090cd5fd8fcd0a1fb63ccf37807cd2e9469fd7450f620d1356dde70d516a79635ca
- Loading branch information