diff --git a/lib/http_parser.cpp b/lib/http_parser.cpp index 4bc1210f..2047be6d 100644 --- a/lib/http_parser.cpp +++ b/lib/http_parser.cpp @@ -51,7 +51,9 @@ std::string HTTP::Parser::BuildResponse(std::string code, std::string message){ std::string tmp = protocol+" "+code+" "+message+"\n"; for (it=headers.begin(); it != headers.end(); it++){ if ((*it).first != "" && (*it).second != ""){ - tmp += (*it).first + ": " + (*it).second + "\n"; + if ((*it).first != "Content-Length" || (*it).second != "0"){ + tmp += (*it).first + ": " + (*it).second + "\n"; + } } } tmp += "\n";