mirror of
https://github.com/RGBCube/serenity
synced 2025-05-17 21:55:07 +00:00
ProtocolServer: Attach downloads and their lifecycles to clients
Previously a download lived independently of the client connection it came from. This was the source of several undesirable behaviours, including the potential for clients to influence downloads they didn't start, and downloads living longer than their associated client connections. Now we attach downloads to client connections, which means they're cleaned up automatically when the client goes away, and there's significantly less risk of clients interfering with each other.
This commit is contained in:
parent
184ee8ac77
commit
f2621f37a4
17 changed files with 48 additions and 57 deletions
|
@ -38,7 +38,7 @@ HttpProtocol::~HttpProtocol()
|
|||
{
|
||||
}
|
||||
|
||||
RefPtr<Download> HttpProtocol::start_download(PSClientConnection& client, const URL& url)
|
||||
OwnPtr<Download> HttpProtocol::start_download(PSClientConnection& client, const URL& url)
|
||||
{
|
||||
HTTP::HttpRequest request;
|
||||
request.set_method(HTTP::HttpRequest::Method::GET);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue