Spaces:
Sleeping
Sleeping
Dmitry Beresnev commited on
Commit ·
d211568
1
Parent(s): 057edf0
fix encoding
Browse files305 unmodified lines3063073083093103117 unmodified lines3193203213223233243257 unmodified lines33333433533633733894 unmodified lines433434435436437438305 unmodified linesint status = 500;std::string body;std::string content_type = "text/plain; charset=utf-8";};static ProxiedGetResult forward_get_to_worker(const WorkerInfo &worker,7 unmodified lineshttp::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");http::write(stream, req);beast::flat_buffer buffer;7 unmodified linesif (res.base().find(http::field::content_type) != res.base().end()) {out.content_type = res.base()[http::field::content_type].to_string();}return out;}94 unmodified lineshttp::response<http::string_body> res{static_cast<http::status>(upstream.status), req.version()};res.set(http::field::content_type, upstream.content_type);res.set(http::field::server, "llm-manager");res.keep_alive(req.keep_alive());res.body() = upstream.body;305 unmodified lines3063073083093103113127 unmodified lines3203213223233243253267 unmodified lines33433533633733833934034134294 unmodified lines437438439440441442443444445305 unmodified linesint 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 lineshttp::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, "gzip, identity");http::write(stream, req);beast::flat_buffer buffer;7 unmodified linesif (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 lineshttp::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