Spaces:
Sleeping
Sleeping
Dmitry Beresnev commited on
Commit ·
d211568
1
Parent(s): 057edf0
fix encoding
Browse files305 unmodified lines3063073083093103113127 unmodified lines3203213223223233243253267 unmodified lines33433533633733833934034134294 unmodified lines437438439440441442443444445305 unmodified lines int status = 500; std::string body; std::string content_type = "text/plain; charset=utf-8"; std::string content_encoding;};
static ProxiedGetResult forward_get_to_worker(const WorkerInfo &worker,7 unmodified lines http::request<http::string_body> req{http::verb::get, target, 11}; req.set(http::field::host, "127.0.0.1"); req.set(http::field::user_agent, "llm-manager"); req.set(http::field::accept_encoding, "identity"); req.set(http::field::accept_encoding, "gzip, identity"); http::write(stream, req);
beast::flat_buffer buffer;7 unmodified lines if (res.base().find(http::field::content_type) != res.base().end()) { out.content_type = res.base()[http::field::content_type].to_string(); } if (res.base().find(http::field::content_encoding) != res.base().end()) { out.content_encoding = res.base()[http::field::content_encoding].to_string(); } return out;}
94 unmodified lines http::response<http::string_body> res{ static_cast<http::status>(upstream.status), req.version()}; res.set(http::field::content_type, upstream.content_type); if (!upstream.content_encoding.empty()) { res.set(http::field::content_encoding, upstream.content_encoding); } res.set(http::field::server, "llm-manager"); res.keep_alive(req.keep_alive()); res.body() = upstream.body;cpp/llm_manager.cpp+8-1