Invalid MIME type

The Correct HTML MIME Type is text/html
This commit is contained in:
Lin Zhan 2019-05-16 19:00:10 +08:00 committed by GitHub
parent 7154194106
commit 3a7c4e3951
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ int DemoServantImp::doRequest(TarsCurrentPtr current, vector<char> &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;
}