MCPcopy Create free account
hub / github.com/acl-dev/acl / doUnknown

Method doUnknown

lib_acl_cpp/samples/http/http_servlet/http_servlet.cpp:15–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13}
14
15bool http_servlet::doUnknown(acl::HttpServletRequest&,
16 acl::HttpServletResponse& res)
17{
18 res.setStatus(400);
19 res.setContentType("text/html; charset=");
20 // ���� http ��Ӧͷ
21 if (res.sendHeader() == false)
22 return false;
23 // ���� http ��Ӧ��
24 acl::string buf("<root error='unkown request method' />\r\n");
25 (void) res.getOutputStream().write(buf);
26 return false;
27}
28
29bool http_servlet::doGet(acl::HttpServletRequest& req,
30 acl::HttpServletResponse& res)

Callers

nothing calls this directly

Calls 3

setContentTypeMethod · 0.80
sendHeaderMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected