Fixed another NULL bug with the uri->authority. If an badly formed request

was made in the form of http:\\www.somewhere.com/ tinyproxy would SEGV.
This has been corrected.
master
Robert James Kaes 2000-03-28 16:41:45 +00:00
parent add003fd0c
commit 46076808fb
1 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $Id: reqs.c,v 1.3 2000-03-28 16:19:12 rjkaes Exp $
/* $Id: reqs.c,v 1.4 2000-03-28 16:41:45 rjkaes Exp $
*
* This is where all the work in tinyproxy is actually done. Incoming
* connections are added to the active list of connections and then the header
@ -183,6 +183,11 @@ static int clientreq(struct conn_s *connptr)
goto COMMON_EXIT;
}
if (!uri->authority) {
httperr(connptr, 400, "Invalid authority.");
goto COMMON_EXIT;
}
if ((strlen(config.stathost) > 0) &&
strcasecmp(uri->authority, config.stathost) == 0) {
showstats(connptr);