summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2005-01-26 23:48:20 +0000
committerStef Walter <stef@memberwebs.com>2005-01-26 23:48:20 +0000
commit9b07c675be5deba1bc7d419a4262a8dd70a503fc (patch)
treedd10a6aa55cbc4f6e4dc6785f96c1be7944d3fc8
parent3382c10737bc0acad51a0aaa69bb2c1d6335dd8a (diff)
Fix problem null headers causing a crash
-rw-r--r--configure.in4
-rw-r--r--daemon/httpauthd.c9
2 files changed, 9 insertions, 4 deletions
diff --git a/configure.in b/configure.in
index 9e3a7f3..5f8b362 100644
--- a/configure.in
+++ b/configure.in
@@ -36,8 +36,8 @@ dnl Nate Nielsen <nielsen@memberwebs.com>
dnl
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(httpauth, 0.5, nielsen@memberwebs.com)
-AM_INIT_AUTOMAKE(httpauth, 0.5)
+AC_INIT(httpauth, 0.4.91, nielsen@memberwebs.com)
+AM_INIT_AUTOMAKE(httpauth, 0.4.91)
LDFLAGS="$LDFLAGS -L/usr/local/lib"
CFLAGS="$CFLAGS -I/usr/local/include -g -O0"
diff --git a/daemon/httpauthd.c b/daemon/httpauthd.c
index fa79053..f8c6071 100644
--- a/daemon/httpauthd.c
+++ b/daemon/httpauthd.c
@@ -773,9 +773,14 @@ static int httpauth_read(ha_request_t* rq, int ifd)
if(t)
{
- rq->req_headers[i].name = t;
rq->req_headers[i].data = ha_bufparseline(rq->buf, 1);
- i++;
+
+ /* We always need to have data for a header */
+ if(rq->req_headers[i].data)
+ {
+ rq->req_headers[i].name = t;
+ i++;
+ }
}
valid = (t != NULL) ? 1 : 0;