mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:17:35 +00:00
LibHTTP: Respect the 'Connection: close' header on keep-alive jobs
If the server responds with this header, we _must_ close the connection, as the server is allowed to ignore the socket and not respond to anything past that response. Fixes some RequestServer spins.
This commit is contained in:
parent
d16131b100
commit
b0a9c5673e
13 changed files with 55 additions and 23 deletions
|
@ -42,6 +42,8 @@ public:
|
|||
SocketAddress destination_address() const { return m_destination_address; }
|
||||
int destination_port() const { return m_destination_port; }
|
||||
|
||||
virtual bool close() override;
|
||||
|
||||
Function<void()> on_connected;
|
||||
Function<void()> on_error;
|
||||
Function<void()> on_ready_to_read;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue