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; |