Commit graph

16 commits

Author SHA1 Message Date
Andreas Kling
6ed11f1d1c LibWeb: Move ResourceLoader into a new Loader/ directory 2020-06-01 20:42:50 +02:00
AnotherTest
790915da54 LibWeb: Provide some properties to inspectors of ResourceLoader 2020-05-27 11:13:02 +02:00
Andreas Kling
63d98bbd76 LibWeb: Send User-Agent in HTTP requests
Coming soon to a Browser Market Share graph near you! :^)
2020-05-21 12:58:57 +02:00
Conrad Pankoff
184ee8ac77 LibWeb: Recognise and pass gemini URLs to ProtocolServer 2020-05-17 12:41:38 +02:00
Andreas Kling
20f50f9133 LibProtocol: Pass response headers in a case insensitive HashMap
HTTP headers are case-insensitive, so just add CaseInsensitiveTraits
to the HashMap and we're good to go! :^)
2020-05-10 22:32:12 +02:00
Andreas Kling
fe0de26277 LibWeb+Browser: Support about: URL protocol so "about:blank" works :^)
For now, we simply load an empty resource from any about: URL.
2020-05-10 11:14:30 +02:00
Andreas Kling
eb6e35a1be 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. :^)
2020-05-03 23:01:58 +02:00
AnotherTest
7670e5ccf0 LibCore+LibHTTP: Move out the HTTP handler and add HTTPS 2020-05-02 12:24:10 +02:00
Andreas Kling
e3232eb25b LibWeb: Support loading data: URLs transparently via ResourceLoader
This is pretty darn cool! :^)
2020-04-26 22:57:00 +02:00
Andreas Kling
da04147cf6 LibWeb: Run clang-format on ResourceLoader.cpp 2020-04-26 22:08:03 +02:00
Brendan Coles
2d699cd5da LibWeb: Add port blacklist for ResourceLoader::load
`ResourceLoader::load` now rejects URLs which specify a `port`
associated with network services known to be vulnerable to
inter-protocol exploitation.

Fixes #1735
2020-04-12 10:33:35 +02:00
Andreas Kling
fc5067afd2 ProtocolServer+LibProtocol: Reject unhandled URLs instead of asserting
StartDownload requests for unhandled protocols (or invalid URLs) will
now refuse to load instead of asserting. A failure code is sent back
to LibProtocol and Protocol::Client::start_download() returns nullptr.

Fixes #1604.
2020-04-04 20:01:36 +02:00
Andreas Kling
b3c4514902 LibWeb: Don't call an absent error callback in load_sync()
Make ResourceLoader::load_sync() match load() in checking if the
error_callback is null before actually calling it.

Fixes #1623.
2020-04-04 14:17:39 +02:00
Andreas Kling
18d45d1082 LibWeb: Add ResourceLoader::load_sync()
This function creates a nested event loop and runs a load() operation
inside it, returning only once the load has either succeeded or failed.

This will be used to implement blocking loads (ew!)
2020-04-03 22:58:05 +02:00
Linus Groh
021d78f8f7 Browser: Add error page
Add a simple HTML error page that gets loaded into the HtmlView when
loading the page fails.

Closes #1210 and #1516
2020-04-01 18:49:48 +02:00
Andreas Kling
830a57c6b2 LibWeb: Rename directory LibHTML => LibWeb
Let's rename this to LibWeb since it aims to provide more parts of the
web platform than just HTML. :^)
2020-03-07 10:32:51 +01:00
Renamed from Libraries/LibHTML/ResourceLoader.cpp (Browse further)