src/server/daemon/httpparser.c

changeset 182
b982cc285c40
parent 180
98462e878ca7
child 183
f33974f0dce0
equal deleted inserted replaced
181:12828065f120 182:b982cc285c40
74 74
75 int http_parser_validate(HttpParser *parser) { 75 int http_parser_validate(HttpParser *parser) {
76 HTTPRequest *req = parser->request; 76 HTTPRequest *req = parser->request;
77 if( 77 if(
78 !req->method.ptr || req->method.length == 0 78 !req->method.ptr || req->method.length == 0
79 || req->uri.ptr || req->uri.length == 0 79 || !req->uri.ptr || req->uri.length == 0
80 || !req->httpv.ptr || req->httpv.length == 0) 80 || !req->httpv.ptr || req->httpv.length == 0)
81 { 81 {
82 return 0; 82 return 0;
83 } 83 }
84 return 1; 84 return 1;

mercurial