void Method_Do(struct worker_ctl *wctl) { DBGPRINT("==>Method_Do\n"); if(0) Method_DoCGI(wctl); switch(wctl->conn.con_req.method) { case METHOD_PUT: Method_DoPut(wctl); break; case METHOD_DELETE: Method_DoDelete(wctl); break; case METHOD_GET: Method_DoGet(wctl); break; case METHOD_POST: Method_DoPost(wctl); break; case METHOD_HEAD: Method_DoHead(wctl); break; default: Method_DoList(wctl); } DBGPRINT("<==Method_Do\n"); }
static int Method_DoHead(struct worker_ctl *wctl) { Method_DoGet(wctl); close(wctl->conn.con_res.fd); wctl->conn.con_res.fd = -1; return 0; }
void Method_Do(struct worker_ctrl *wctl) { printf("==> Method_Do\n"); switch(wctl->conn.con_req.method) { case METHOD_GET: Method_DoGet(wctl); break; default: printf("other method\n"); } printf("<== Method_Do\n"); }