added a check for http (2)

This commit is contained in:
roberto@debian32
2011-09-30 09:42:19 +02:00
parent 5e2b460dc8
commit 7be45c77b1
2 changed files with 6 additions and 1 deletions
+2
View File
@@ -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
View File
@@ -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;
}