LibWebView: Respect autocomplete response Content-Encoding headers

For example, Google uses ISO-8859-1 encoding. This patch allows us to
decode such responses, falling back to UTF-8 if a Content-Type was not
specified or could not be parsed. We should also now handle if decoding
fails, rather than crashing inside JsonParser.
This commit is contained in:
Timothy Flynn 2025-04-16 17:35:24 -04:00 committed by Tim Flynn
commit 5e9a11b13d
Notes: github-actions[bot] 2025-04-17 11:52:41 +00:00
3 changed files with 29 additions and 6 deletions

View file

@ -81,7 +81,7 @@ set(GENERATED_SOURCES
)
serenity_lib(LibWebView webview)
target_link_libraries(LibWebView PRIVATE LibCore LibDevTools LibFileSystem LibGfx LibImageDecoderClient LibIPC LibRequests LibJS LibWeb LibUnicode LibURL LibSyntax)
target_link_libraries(LibWebView PRIVATE LibCore LibDevTools LibFileSystem LibGfx LibImageDecoderClient LibIPC LibRequests LibJS LibWeb LibUnicode LibURL LibSyntax LibTextCodec)
if (APPLE)
target_link_libraries(LibWebView PRIVATE LibThreading)