From 9b07c675be5deba1bc7d419a4262a8dd70a503fc Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 26 Jan 2005 23:48:20 +0000 Subject: Fix problem null headers causing a crash --- daemon/httpauthd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'daemon') 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; -- cgit v1.2.3