mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-05 21:21:53 +00:00
added a check for http (2)
This commit is contained in:
@@ -263,6 +263,8 @@ int uwsgi_proto_http_parser(struct wsgi_request *wsgi_req) {
|
||||
free(wsgi_req->proto_parser_buf);
|
||||
if (len < 0)
|
||||
uwsgi_error("recv()");
|
||||
// this is simple ping packet
|
||||
else return -2;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
+4
-1
@@ -366,7 +366,10 @@ int uwsgi_parse_packet(struct wsgi_request *wsgi_req, int timeout) {
|
||||
status = uwsgi_proto_uwsgi_parser(wsgi_req);
|
||||
}
|
||||
if (status < 0) {
|
||||
uwsgi_log("error parsing request\n");
|
||||
if (status == -1)
|
||||
uwsgi_log("error parsing request\n");
|
||||
else if (status == -2)
|
||||
uwsgi_log("open-close packet (ping/check) received\n");
|
||||
//close(upoll->fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user