mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 18:55:08 +00:00
ProtocolServer: Pass HTTP response headers to the client
We now store the response headers in a download object on the protocol server side and pass it to the client when finishing up a download. Response headers are passed as an IPC::Dictionary. :^)
This commit is contained in:
parent
a83d74b38c
commit
eb6e35a1be
18 changed files with 49 additions and 30 deletions
|
@ -87,7 +87,11 @@ void PSClientConnection::did_finish_download(Badge<Download>, Download& download
|
|||
m_shared_buffers.set(buffer->shbuf_id(), buffer);
|
||||
}
|
||||
ASSERT(download.total_size().has_value());
|
||||
post_message(Messages::ProtocolClient::DownloadFinished(download.id(), success, download.total_size().value(), buffer ? buffer->shbuf_id() : -1));
|
||||
|
||||
IPC::Dictionary response_headers;
|
||||
for (auto& it : download.response_headers())
|
||||
response_headers.add(it.key, it.value);
|
||||
post_message(Messages::ProtocolClient::DownloadFinished(download.id(), success, download.total_size().value(), buffer ? buffer->shbuf_id() : -1, response_headers));
|
||||
}
|
||||
|
||||
void PSClientConnection::did_progress_download(Badge<Download>, Download& download)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue