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

Method doOther

lib_acl_cpp/samples/cgi/http_servlet.cpp:24–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22 }
23
24 virtual bool doOther(HttpServletRequest&, HttpServletResponse& res,
25 const char* method)
26 {
27 res.setStatus(400);
28 res.setContentType("text/xml; charset=gb2312");
29 // ���� http ��Ӧͷ
30 if (res.sendHeader() == false)
31 return false;
32 // ���� http ��Ӧ��
33 string buf;
34 buf.format("<root error='unkown method: %s' />\r\n", method);
35 (void) res.getOutputStream().write(buf);
36 return false;
37 }
38
39 virtual bool doGet(HttpServletRequest& req, HttpServletResponse& res)
40 {

Callers

nothing calls this directly

Calls 4

setContentTypeMethod · 0.80
sendHeaderMethod · 0.80
formatMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected