mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
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:
parent
ca200142e9
commit
5e9a11b13d
Notes:
github-actions[bot]
2025-04-17 11:52:41 +00:00
Author: https://github.com/trflynn89
Commit: 5e9a11b13d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4381
3 changed files with 29 additions and 6 deletions
|
@ -34,7 +34,7 @@ public:
|
|||
void query_autocomplete_engine(String);
|
||||
|
||||
private:
|
||||
static ErrorOr<Vector<String>> received_autocomplete_respsonse(AutocompleteEngine const&, StringView response);
|
||||
static ErrorOr<Vector<String>> received_autocomplete_respsonse(AutocompleteEngine const&, Optional<ByteString const&> content_type, StringView response);
|
||||
void invoke_autocomplete_query_complete(Vector<String> suggestions) const;
|
||||
|
||||
String m_query;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue