Description: Append server name to HTTP response
Author: Lance Lin <lq27267@gmail.com>
Forwarded: not-needed
Date: 15 Aug 2022

--- a/src/protocol/HttpMessage.h
+++ b/src/protocol/HttpMessage.h
@@ -74,9 +74,17 @@
 
 	bool add_header_pair(const char *name, const char *value)
 	{
+		if(strcmp(name, "Server") == 0) {
+			std::string append = value;
+			append += " - powered by Workflow v0.10";
+			return http_parser_add_header(name, strlen(name), 
+					              append.c_str(), append.length(),
+						      this->parser) == 0;
+		} else {
 		return http_parser_add_header(name, strlen(name),
-									  value, strlen(value),
-									  this->parser) == 0;
+					      value, strlen(value),
+					      this->parser) == 0;
+		}
 	}
 
 	bool set_header(const struct HttpMessageHeader *header)
@@ -149,9 +157,17 @@
 
 	bool add_header_pair(const std::string& name, const std::string& value)
 	{
+		if(strcmp(name.c_str(), "Server") == 0) {
+			std::string append = value;
+			append += " - powered by Workflow v0.10";
+			return http_parser_add_header(name.c_str(), name.size(),
+						      append.c_str(), append.size(),
+						     this->parser) == 0;
+		} else {
 		return http_parser_add_header(name.c_str(), name.size(),
 									  value.c_str(), value.size(),
 									  this->parser) == 0;
+		}
 	}
 
 	bool set_header_pair(const std::string& name, const std::string& value)
