From 07887428a9773bd7728b90f67c4f13f2f161d848 Mon Sep 17 00:00:00 2001 From: James Booth Date: Tue, 7 Jul 2015 23:09:24 +0100 Subject: [PATCH] Fixed indentation and whitespace --- client.c | 6 +++--- http-parser/http_parser.h | 1 - worker.c | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/client.c b/client.c index 9987c01..4543cff 100644 --- a/client.c +++ b/client.c @@ -180,9 +180,9 @@ http_client_on_message_complete(struct http_parser *p) { struct http_client *c = p->data; /* keep-alive detection */ - if (c->parser.flags & F_CONNECTION_CLOSE) { - c->keep_alive = 0; - } else if(c->parser.http_major == 1 && c->parser.http_minor == 1) { /* 1.1 */ + if (c->parser.flags & F_CONNECTION_CLOSE) { + c->keep_alive = 0; + } else if(c->parser.http_major == 1 && c->parser.http_minor == 1) { /* 1.1 */ c->keep_alive = 1; } c->http_version = c->parser.http_minor; diff --git a/http-parser/http_parser.h b/http-parser/http_parser.h index 30cec8c..71beecd 100644 --- a/http-parser/http_parser.h +++ b/http-parser/http_parser.h @@ -165,7 +165,6 @@ enum flags }; - void http_parser_init(http_parser *parser, enum http_parser_type type); diff --git a/worker.c b/worker.c index bd32ad7..2bf29d3 100644 --- a/worker.c +++ b/worker.c @@ -63,8 +63,8 @@ worker_can_read(int fd, short event, void *p) { if(c->failed_alloc) { slog(c->w->s, WEBDIS_DEBUG, "503", 3); http_send_error(c, 503, "Service Unavailable"); - } else if (c->parser.flags & F_CONNECTION_CLOSE) { - c->broken = 1; + } else if (c->parser.flags & F_CONNECTION_CLOSE) { + c->broken = 1; } else if(c->is_websocket) { /* we need to use the remaining (unparsed) data as the body. */ if(nparsed < ret) {