@@ -194,10 +196,10 @@ int http_codec::encode_request(const LibItsHttp__TypesAndValues::Request& p_requ
_ec.is_content_length_present=0x00;
}
// Encode Content-length header
p_encoding_buffer.put_cs("Content-length: ");
// Encode Content-Length header
p_encoding_buffer.put_cs("Content-Length: ");
if(_ec.length!=0){
loggers::get_instance().log("http_codec::encode_request: Content-length: %s",static_cast<constchar*>(int2str(_ec.length+2/*Stand for the last CRLF*/)));
loggers::get_instance().log("http_codec::encode_request: Content-Length: %s",static_cast<constchar*>(int2str(_ec.length+2/*Stand for the last CRLF*/)));
p_encoding_buffer.put_cs(static_cast<constchar*>(int2str(_ec.length+2/*Stand for the last CRLF*/)));
_ec.is_content_length_present=0x01;
}else{
@@ -234,7 +236,7 @@ int http_codec::encode_response (const LibItsHttp__TypesAndValues::Response& p_r
@@ -488,7 +498,7 @@ int http_codec::decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBod
loggers::get_instance().log_msg("http_codec::decode_body: Convert string to binary: ",s);
#endif
// Align the payload length with the specified Content-lenght value
// Align the payload length with the specified Content-Lenght value
loggers::get_instance().log("http_codec::decode_body: _dc.length=%d - body length=%d",_dc.length,s.lengthof());
OCTETSTRINGbody;
if(_dc.length!=0){
@@ -590,7 +600,10 @@ int http_codec::decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBod
loggers::get_instance().log("http_codec::decode_body: Find xml message");
LibItsHttp__XmlMessageBodyTypes::XmlBodyxml_body;
// TODO To be refined adding a string identifier to check which codec to use. E.g. held_code.id() returns "xmlns=\"urn:ietf:params:xml:ns:geopriv:held\">"