summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2008-07-21 20:49:12 +0000
committerStef Walter <stef@memberwebs.com>2008-07-21 20:49:12 +0000
commit7064b9696190e3952373865ce538b98cf278d8f6 (patch)
tree55004fe7d4887fb82543cd78e67037ff31f5e8fb
parent4c4bfb64b62ff5b7b7fa21ec0185db797f434386 (diff)
* Fix endles loop condition by not closing connection properly once finished.
* Fix build issues on FreeBSD.
-rw-r--r--daemon/httpauthd.c1
-rw-r--r--daemon/httpauthd.h1
-rw-r--r--daemon/request.c5
3 files changed, 7 insertions, 0 deletions
diff --git a/daemon/httpauthd.c b/daemon/httpauthd.c
index b75c116..b8f5e1b 100644
--- a/daemon/httpauthd.c
+++ b/daemon/httpauthd.c
@@ -21,6 +21,7 @@
#include <sys/types.h>
#include <sys/param.h>
+#include <assert.h>
#include <stddef.h>
#include <stdio.h>
#include <errno.h>
diff --git a/daemon/httpauthd.h b/daemon/httpauthd.h
index 604c4db..490026c 100644
--- a/daemon/httpauthd.h
+++ b/daemon/httpauthd.h
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include "buffer.h"
#include <syslog.h>
+#include <pthread.h>
/* -----------------------------------------------------------------------
* HTTP Auth Handlers
diff --git a/daemon/request.c b/daemon/request.c
index 30c9d2f..53738c0 100644
--- a/daemon/request.c
+++ b/daemon/request.c
@@ -675,6 +675,7 @@ ha_request_process (ha_request_t *rq)
{
int ret, cont = 1;
+ assert (!ha_buferr (&rq->req_buf));
ha_bufreset (&rq->req_buf);
ret = read_request (rq);
@@ -688,6 +689,10 @@ ha_request_process (ha_request_t *rq)
log_request (rq);
+ /* Read request said there's no more */
+ if (ret == 0)
+ cont = 0;
+
switch(rq->req_type) {
case REQTYPE_AUTH:
ret = process_auth (rq);