Commit graph

15 commits

Author SHA1 Message Date
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
devgianlu
49c388b891 LibTLS+LibWeb+LibCrypto: Move Certificate to LibCrypto
By moving `Certificate` to `LibCrypto` it is possible to reuse a bunch
of code from in `LibCrypto` itself. It also moves some constants
and pieces of code to a more appropriate place than `LibTLS`.

This also makes future work on WebCryptoAPI easier.
2024-11-25 13:38:38 +01:00
devgianlu
e42410a7a7 LibTLS: Move DefaultRootCACertificates to correct header file
The declaration of `DefaultRootCACertificates` was in `Certificate.h`
and its implementation in `TLSv12.cpp`. It has been moved over
to `TLSv12.h` for consistency.

This is in preparation of the next commits to split the changes.
2024-11-25 13:38:38 +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
Some checks are pending
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
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
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
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
0ff91a5273 LibWebView+Services+UI: Move process helpers to LibWebView 2024-11-11 07:35:43 -05:00
Timothy Flynn
db47cc41f8 Everywhere: Move the Ladybird folder to UI 2024-11-10 12:50:45 +01:00
Timothy Flynn
22e0eeada2 Everywhere: Hoist the Services folder to the top-level 2024-11-10 12:50:45 +01:00