diff options
Diffstat (limited to 'Userland/Libraries/LibHTTP/Job.cpp')
-rw-r--r-- | Userland/Libraries/LibHTTP/Job.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Userland/Libraries/LibHTTP/Job.cpp b/Userland/Libraries/LibHTTP/Job.cpp index 7da8eee947..062397071f 100644 --- a/Userland/Libraries/LibHTTP/Job.cpp +++ b/Userland/Libraries/LibHTTP/Job.cpp @@ -25,7 +25,7 @@ */ #include <AK/Debug.h> -#include <LibCore/Gzip.h> +#include <LibCompress/Gzip.h> #include <LibCore/TCPSocket.h> #include <LibHTTP/HttpResponse.h> #include <LibHTTP/Job.h> @@ -39,13 +39,13 @@ static ByteBuffer handle_content_encoding(const ByteBuffer& buf, const String& c dbgln_if(JOB_DEBUG, "Job::handle_content_encoding: buf has content_encoding={}", content_encoding); if (content_encoding == "gzip") { - if (!Core::Gzip::is_compressed(buf)) { + if (!Compress::GzipDecompressor::is_likely_compressed(buf)) { dbgln("Job::handle_content_encoding: buf is not gzip compressed!"); } dbgln_if(JOB_DEBUG, "Job::handle_content_encoding: buf is gzip compressed!"); - auto uncompressed = Core::Gzip::decompress(buf); + auto uncompressed = Compress::GzipDecompressor::decompress_all(buf); if (!uncompressed.has_value()) { dbgln("Job::handle_content_encoding: Gzip::decompress() failed. Returning original buffer."); return buf; @@ -352,6 +352,7 @@ void Job::finish_up() m_received_buffers.clear(); // For the time being, we cannot stream stuff with content-encoding set to _anything_. + // FIXME: LibCompress exposes a streaming interface, so this can be resolved auto content_encoding = m_headers.get("Content-Encoding"); if (content_encoding.has_value()) { flattened_buffer = handle_content_encoding(flattened_buffer, content_encoding.value()); |