Commit graph

21 commits

Author SHA1 Message Date
devgianlu
42a18a4a91 RequestServer: Use default certificate for DNS over TLS 2025-02-18 15:46:44 +01:00
devgianlu
24d3da64e5 LibWebSocket: Support specifying root certificate path 2025-02-17 19:52:43 +01:00
David Hewitt
6b661a91c6 RequestServer: Send empty headers in requests 2025-02-17 13:43:16 +01:00
rmg-x
41c6f93aa8 RequestServer: Remove IPV6 bracket notation on host before resolving
Previously, we were passing in the serialized value which included
square brackets but that isn't a valid IPV6 address.
2025-02-17 12:02:41 +01:00
stasoid
3e46cb9067 LibWebView+ImageDecoder+RequestServer+WebContent: Add init_transport 2025-02-12 22:32:13 -07:00
rmg-x
ec481aa08a LibDNS+RequestServer: Fix UAF in lookup() by changing Span -> Vector
Co-authored-by: Ali Mohammad Pur <ali.mpfard@gmail.com>
2025-02-11 07:24:33 +01:00
rmg-x
17c0d4469c RequestServer: Check for empty list of IP addresses in DNS result
Before, if something went wrong with DNS lookup and there were unrelated
records (i.e. not A or AAAA) then we would still attempt to build a
resolve list. This resulted in curl errors related to the option itself
and displayed as "unknown network error" to the user.
2025-02-03 00:14:22 +01:00
Andrew Kaster
91161d77e0 RequestServer: Remove unused content length check for received data 2025-01-23 21:35:58 +01:00
Andreas Kling
7cd6ea6f33 RequestServer: Clean up the CURLM "multi handle" when client drops
Otherwise we may leak all kinds of things inside CURL.
2024-12-25 19:14:45 +01:00
Shannon Booth
0fa54c2327 LibURL+LibWeb: Make URL::serialize return a String
Simplifying a bunch of uneeded error handling around the place.
2024-12-04 16:34:13 +00:00
rmg-x
c490118b6c RequestServer: Free curl string lists and check result before setting
Previously, we leaked the `curl_slist`s on every request. This also
validates the pointer we get from `curl_slist_append` before setting the
option.

Also, use the `set_option` helper for CURLOPT_RESOLVE as it will print
when there is an error.
2024-12-01 11:32:45 +01:00
rmg-x
32358df13e RequestServer: Remove unused global "g_dns_cache"
`curl_slist_append` copies the string so we don't need to keep it around
ourselves.
2024-12-01 11:32:45 +01:00
rmg-x
9b8987e34e RequestServer: Use existing type for buffered UDP socket 2024-12-01 11:32:45 +01:00
Sam Atkins
900c131178 LibURL: Make URL::serialized_host() infallible
This can no longer fail, so update the return type to match.

This makes a few more methods now unable to return errors, but one thing
at a time. 😅
2024-11-30 12:07:39 +01:00
Ali Mohammad Pur
ff311c1560 RequestServer+LibDNS: Don't .await() the DNS lookup promise
...and make sure it will eventually complete (or fail) by adding a
timeout retry sequence.

Fixes an issue where RequestServer would stick around after exit,
waiting for piled up DNS requests for a long time.
2024-11-25 11:46:35 +01:00
Pavel Shliak
442629064b LibCore: Remove deprecated ElapsedTimer::elapsed()
This follows FIXME in the code.
2024-11-23 19:20:03 +01:00
Pavel Shliak
001df24935 LibWebSocket: Clean up #include directives
This change aims to improve the speed of incremental builds.
2024-11-21 14:08:33 +01:00
Ali Mohammad Pur
7d1291b9f0 RequestServer: Implement the ResolveOnly EnsureConnection level 2024-11-20 21:37:58 +01:00
Ali Mohammad Pur
7e20f4726f LibDNS+LibWeb+Ladybird+RequestServer: Let there be DNS over TLS
This commit adds our own DNS resolver, with the aim of implementing DoT
(and eventually DoH, maybe even DNSSEC etc.)
2024-11-20 21:37:58 +01:00
rmg-x
8d511b2f7b RequestServer: Clear "Content-Type" header when one isn't provided
libcurl will automatically set the Content-Type header when using the
CURLOPT_POSTFIELDS option to "application/x-www-form-urlencoded".

See: https://curl.se/libcurl/c/CURLOPT_POSTFIELDS.html

The following WPT cases now pass (8 tests):
http://wpt.live/xhr/send-blob-with-no-mime-type.html
2024-11-18 02:03:11 +01:00
Timothy Flynn
22e0eeada2 Everywhere: Hoist the Services folder to the top-level 2024-11-10 12:50:45 +01:00
Renamed from Userland/Services/RequestServer/ConnectionFromClient.cpp (Browse further)