mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 21:15:07 +00:00
ProtocolServer: Support request headers
You can now pass a dictionary of request headers when starting a new download in ProtocolServer. The HTTP and HTTPS protocol will include the headers in their requests.
This commit is contained in:
parent
25cfdf3f67
commit
897998017a
13 changed files with 35 additions and 13 deletions
|
@ -64,7 +64,7 @@ OwnPtr<Messages::ProtocolServer::StartDownloadResponse> ClientConnection::handle
|
|||
auto* protocol = Protocol::find_by_name(url.protocol());
|
||||
if (!protocol)
|
||||
return make<Messages::ProtocolServer::StartDownloadResponse>(-1);
|
||||
auto download = protocol->start_download(*this, url);
|
||||
auto download = protocol->start_download(*this, url, message.request_headers().entries());
|
||||
if (!download)
|
||||
return make<Messages::ProtocolServer::StartDownloadResponse>(-1);
|
||||
auto id = download->id();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue