Loading ccsrc/Protocols/Http/http_codec.cc +6 −1 Original line number Diff line number Diff line Loading @@ -503,6 +503,7 @@ int http_codec::decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBod // Convert into string params p; p["decode_str"] = std::string(static_cast<const unsigned char*>(body), body.lengthof() + static_cast<const unsigned char*>(body)); loggers::get_instance().log("http_codec::decode_body: decode_str: %s", p["decode_str"]); // Try to identify xml if (p["decode_str"].find("<?xml version=") != std::string::npos) { loggers::get_instance().log("http_codec::decode_body: Find xml message"); Loading Loading @@ -540,6 +541,10 @@ int http_codec::decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBod xml_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast<const unsigned char*>(body)); } message_body.xml__body() = xml_body; } else { loggers::get_instance().warning("http_codec::decode_body: No XML codec found"); xml_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast<const unsigned char*>(body)); message_body.xml__body() = xml_body; } } else if (p["decode_str"].find("<html>") != std::string::npos) { // Try to identify HTML loggers::get_instance().log("http_codec::decode_body: Find html message"); Loading Loading
ccsrc/Protocols/Http/http_codec.cc +6 −1 Original line number Diff line number Diff line Loading @@ -503,6 +503,7 @@ int http_codec::decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBod // Convert into string params p; p["decode_str"] = std::string(static_cast<const unsigned char*>(body), body.lengthof() + static_cast<const unsigned char*>(body)); loggers::get_instance().log("http_codec::decode_body: decode_str: %s", p["decode_str"]); // Try to identify xml if (p["decode_str"].find("<?xml version=") != std::string::npos) { loggers::get_instance().log("http_codec::decode_body: Find xml message"); Loading Loading @@ -540,6 +541,10 @@ int http_codec::decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBod xml_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast<const unsigned char*>(body)); } message_body.xml__body() = xml_body; } else { loggers::get_instance().warning("http_codec::decode_body: No XML codec found"); xml_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast<const unsigned char*>(body)); message_body.xml__body() = xml_body; } } else if (p["decode_str"].find("<html>") != std::string::npos) { // Try to identify HTML loggers::get_instance().log("http_codec::decode_body: Find html message"); Loading