mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
ProtocolServer+LibProtocol: Propagate HTTP status codes to clients
Clients now receive HTTP status codes like 200, 404, etc. Note that a 404 with content is still considered a "successful" download from ProtocolServer's perspective. It's up to the client to interpret the status code. I'm not sure if this is the best API, but it'll work for now.
This commit is contained in:
@@ -72,7 +72,7 @@ void Client::handle(const Messages::ProtocolClient::DownloadFinished& message)
|
||||
{
|
||||
RefPtr<Download> download;
|
||||
if ((download = m_downloads.get(message.download_id()).value_or(nullptr))) {
|
||||
download->did_finish({}, message.success(), message.total_size(), message.shbuf_id(), message.response_headers());
|
||||
download->did_finish({}, message.success(), message.status_code(), message.total_size(), message.shbuf_id(), message.response_headers());
|
||||
}
|
||||
send_sync<Messages::ProtocolServer::DisownSharedBuffer>(message.shbuf_id());
|
||||
m_downloads.remove(message.download_id());
|
||||
|
||||
Reference in New Issue
Block a user