Loading ccsrc/Protocols/Http/http_codec.cc +9 −3 Original line number Diff line number Diff line Loading @@ -113,6 +113,8 @@ int http_codec::decode(const OCTETSTRING &data, LibHttp__TypesAndValues::HttpMes LibHttp__TypesAndValues::Headers headers; std::string content_type; decode_headers(decoding_buffer, headers, content_type); loggers::get_instance().log("http_codec::decode: _dc.length=%d", _dc.length); loggers::get_instance().log("http_codec::decode: decoding_buffer.get_len()=%d", decoding_buffer.get_len()); if (_dc.length > decoding_buffer.get_len()) { // HTTP response is fragmented // Need to bufferize the first packet and wait for the other fragments tp be received loggers::get_instance().warning("http_codec::decode: Need to bufferize the first packet and wait for the other fragments tp be received"); Loading Loading @@ -417,6 +419,10 @@ int http_codec::decode_headers(TTCN_Buffer &decoding_buffer, LibHttp__TypesAndVa } break; case 1: if (headers.is_bound()) { if (_dc.length == -1) { // content-Length header not found, force length to 0, assuming no body is present loggers::get_instance().log("http_codec::decode_headers: Force _dc.length to 0"); _dc.length = 0; } loggers::get_instance().log_msg("<<< http_codec::decode_headers: ", headers); return 0; } else { Loading @@ -431,7 +437,7 @@ int http_codec::decode_headers(TTCN_Buffer &decoding_buffer, LibHttp__TypesAndVa } int http_codec::decode_header(CHARSTRING &header_line, LibHttp__TypesAndValues::Header &header) { loggers::get_instance().log_msg(">>> http_codec::decode_header", header_line); loggers::get_instance().log_msg(">>> http_codec::decode_header: ", header_line); try { std::string str(static_cast<const char *>(header_line)); Loading Loading
ccsrc/Protocols/Http/http_codec.cc +9 −3 Original line number Diff line number Diff line Loading @@ -113,6 +113,8 @@ int http_codec::decode(const OCTETSTRING &data, LibHttp__TypesAndValues::HttpMes LibHttp__TypesAndValues::Headers headers; std::string content_type; decode_headers(decoding_buffer, headers, content_type); loggers::get_instance().log("http_codec::decode: _dc.length=%d", _dc.length); loggers::get_instance().log("http_codec::decode: decoding_buffer.get_len()=%d", decoding_buffer.get_len()); if (_dc.length > decoding_buffer.get_len()) { // HTTP response is fragmented // Need to bufferize the first packet and wait for the other fragments tp be received loggers::get_instance().warning("http_codec::decode: Need to bufferize the first packet and wait for the other fragments tp be received"); Loading Loading @@ -417,6 +419,10 @@ int http_codec::decode_headers(TTCN_Buffer &decoding_buffer, LibHttp__TypesAndVa } break; case 1: if (headers.is_bound()) { if (_dc.length == -1) { // content-Length header not found, force length to 0, assuming no body is present loggers::get_instance().log("http_codec::decode_headers: Force _dc.length to 0"); _dc.length = 0; } loggers::get_instance().log_msg("<<< http_codec::decode_headers: ", headers); return 0; } else { Loading @@ -431,7 +437,7 @@ int http_codec::decode_headers(TTCN_Buffer &decoding_buffer, LibHttp__TypesAndVa } int http_codec::decode_header(CHARSTRING &header_line, LibHttp__TypesAndValues::Header &header) { loggers::get_instance().log_msg(">>> http_codec::decode_header", header_line); loggers::get_instance().log_msg(">>> http_codec::decode_header: ", header_line); try { std::string str(static_cast<const char *>(header_line)); Loading