mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 09:04:30 +00:00
LibCore+LibHTTP: Move out the HTTP handler and add HTTPS
This commit is contained in:
committed by
Andreas Kling
parent
8d20a526e5
commit
7670e5ccf0
@@ -24,8 +24,8 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <LibCore/HttpJob.h>
|
||||
#include <LibCore/HttpRequest.h>
|
||||
#include <LibHTTP/HttpJob.h>
|
||||
#include <LibHTTP/HttpRequest.h>
|
||||
#include <ProtocolServer/HttpDownload.h>
|
||||
#include <ProtocolServer/HttpProtocol.h>
|
||||
|
||||
@@ -40,11 +40,11 @@ HttpProtocol::~HttpProtocol()
|
||||
|
||||
RefPtr<Download> HttpProtocol::start_download(PSClientConnection& client, const URL& url)
|
||||
{
|
||||
Core::HttpRequest request;
|
||||
request.set_method(Core::HttpRequest::Method::GET);
|
||||
HTTP::HttpRequest request;
|
||||
request.set_method(HTTP::HttpRequest::Method::GET);
|
||||
request.set_url(url);
|
||||
auto job = request.schedule();
|
||||
if (!job)
|
||||
return nullptr;
|
||||
return HttpDownload::create_with_job({}, client, (Core::HttpJob&)*job);
|
||||
return HttpDownload::create_with_job({}, client, (HTTP::HttpJob&)*job);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user