mirror of
https://github.com/openappsec/openappsec.git
synced 2025-09-30 11:44:29 +03:00
Mar 26th 2023 Dev
This commit is contained in:
@@ -130,10 +130,10 @@ HTTPDecoder::handleBody()
|
||||
if (maybe_transfer_encoding.ok()) {
|
||||
auto transfer_encoding_type = maybe_transfer_encoding.unpack();
|
||||
if (transfer_encoding_type == "chunked") {
|
||||
if (Singleton::exists<I_Environment>()) {
|
||||
I_Environment *env = Singleton::Consume<I_Environment>::by<HTTPDecoder>();
|
||||
auto is_k8s_env = env->get<bool>("k8s_env");
|
||||
if (is_k8s_env.ok() && *is_k8s_env) {
|
||||
if (Singleton::exists<I_EnvDetails>()) {
|
||||
I_EnvDetails *env_details = Singleton::Consume<I_EnvDetails>::by<HTTPDecoder>();
|
||||
EnvType env_type = env_details->getEnvType();
|
||||
if (env_type == EnvType::K8S) {
|
||||
dbgDebug(D_COMMUNICATION) << "Getting Chunked Response in a k8s env";
|
||||
return getChunkedResponseK8s();
|
||||
}
|
||||
|
@@ -21,12 +21,12 @@
|
||||
#include "messaging/http_core.h"
|
||||
#include "i_message_decoder.h"
|
||||
#include "i_messaging.h"
|
||||
#include "i_environment.h"
|
||||
#include "i_env_details.h"
|
||||
|
||||
class HTTPDecoder
|
||||
:
|
||||
public I_MessageDecoder <HTTPResponse>,
|
||||
Singleton::Consume<I_Environment>
|
||||
Singleton::Consume<I_EnvDetails>
|
||||
{
|
||||
public:
|
||||
HTTPDecoder(I_Messaging::Method _method);
|
||||
|
Reference in New Issue
Block a user