mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 09:28:13 +00:00
LibWeb: Decode XHR text with the specified charset in the MIME type
The MIME type can come from either the Content-Type header in the response header list, or the overridden MIME type passed into overrideMimeType() This is required by Google Maps, which downloads blobs encoded in x-user-defined format.
This commit is contained in:
parent
0e0f98a45e
commit
28f0193d9b
2 changed files with 221 additions and 2 deletions
|
@ -74,6 +74,14 @@ private:
|
|||
void set_status(unsigned status) { m_status = status; }
|
||||
void fire_progress_event(const String&, u64, u64);
|
||||
|
||||
MimeSniff::MimeType get_response_mime_type() const;
|
||||
Optional<String> get_final_encoding() const;
|
||||
|
||||
String get_text_response() const;
|
||||
|
||||
Optional<Vector<String>> get_decode_and_split(String const& header_name, HashMap<String, String, CaseInsensitiveStringTraits> const& header_list) const;
|
||||
Optional<MimeSniff::MimeType> extract_mime_type(HashMap<String, String, CaseInsensitiveStringTraits> const& header_list) const;
|
||||
|
||||
explicit XMLHttpRequest(DOM::Window&);
|
||||
|
||||
NonnullRefPtr<DOM::Window> m_window;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue