From 3a7c4e39510bdb4b6849ce858a1f839a122edd9b Mon Sep 17 00:00:00 2001 From: Lin Zhan Date: Thu, 16 May 2019 19:00:10 +0800 Subject: [PATCH] Invalid MIME type The Correct HTML MIME Type is text/html --- servant/script/http_demo/DemoServantImp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servant/script/http_demo/DemoServantImp.cpp b/servant/script/http_demo/DemoServantImp.cpp index edd29dc..a7e6fe3 100644 --- a/servant/script/http_demo/DemoServantImp.cpp +++ b/servant/script/http_demo/DemoServantImp.cpp @@ -38,7 +38,7 @@ int DemoServantImp::doRequest(TarsCurrentPtr current, vector &buffer) int DemoServantImp::doRequest(const TC_HttpRequest &req, TC_HttpResponse &rsp) { string msg = "Hello Tars!"; - rsp.setContentType("html/text"); + rsp.setContentType("text/html"); rsp.setResponse(msg.c_str(), msg.size()); return 0; }