1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:57:45 +00:00

WebServer: Stream the downloaded files

...instead of reading them into memory first.
This makes it possible to download large files from WebServer.
This commit is contained in:
AnotherTest 2021-01-30 14:20:42 +03:30 committed by Andreas Kling
parent 58abdde2e4
commit bdda1600d0
2 changed files with 19 additions and 6 deletions

View file

@ -42,7 +42,7 @@ private:
Client(NonnullRefPtr<Core::TCPSocket>, const String&, Core::Object* parent);
void handle_request(ReadonlyBytes);
void send_response(StringView, const HTTP::HttpRequest&, const String& content_type);
void send_response(InputStream&, const HTTP::HttpRequest&, const String& content_type);
void send_redirect(StringView redirect, const HTTP::HttpRequest& request);
void send_error_response(unsigned code, const StringView& message, const HTTP::HttpRequest&);
void die();