Commit 2da95b2d authored by Yann Garcia's avatar Yann Garcia
Browse files

LIS Validation with Intersys

parent 1423742e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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");
@@ -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");