ClientHandler/ClientHandler.cpp
HttpMessage ClientHandler::constructMessage(HttpMessage msg) {
		msg.removeAttribute("content-length");
		std::string bodyString = "<file>" + msg.findValue("file") + "</file>";
		std::string sizeString = Converter<size_t>::toString(bodyString.size());
		msg.addAttribute(HttpMessage::Attribute("content-length", sizeString));
		msg.addBody(bodyString);
		return msg;
}
// ---------------< construct a general message to be sent as acknowledgement >---------
< construct a general message to be sent as acknowledgement >
< construct a general message to be sent as acknowledgement >
HttpMessage ClientHandler::constructMessage(HttpMessage msg) {
		msg.removeAttribute("content-length");
		std::string bodyString = "<file>" + msg.findValue("file") + "</file>";
		std::string sizeString = Converter<size_t>::toString(bodyString.size());
		msg.addAttribute(HttpMessage::Attribute("content-length", sizeString));
		msg.addBody(bodyString);
		return msg;
}
HttpMessage ClientHandler :: constructMessage ( HttpMessage msg ) { msg . removeAttribute ( " " ) ; std :: string bodyString = " " + msg . findValue ( " " ) + " " ; std :: string sizeString = Converter < size_t > :: toString ( bodyString . size ( ) ) ; msg . addAttribute ( HttpMessage :: Attribute ( " " , sizeString ) ) ; msg . addBody ( bodyString ) ; return msg ; }
< construct a general message to be sent as acknowledgement >
< construct a general message to be sent as acknowledgement >