From 54ce40b6cbe345de9ee0075ae4f265d6f7bcf7d5 Mon Sep 17 00:00:00 2001 From: pixel Date: Wed, 13 Jun 2007 07:01:28 +0000 Subject: Slightly changing domain checking behavior - now / is allowed to served by the new request system. --- lib/HttpServ.cc | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'lib/HttpServ.cc') diff --git a/lib/HttpServ.cc b/lib/HttpServ.cc index 6dee7ad..e24a49d 100644 --- a/lib/HttpServ.cc +++ b/lib/HttpServ.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id: HttpServ.cc,v 1.49 2007-06-04 14:24:18 pixel Exp $ */ +/* $Id: HttpServ.cc,v 1.50 2007-06-13 07:01:28 pixel Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -175,19 +175,16 @@ int ProcessRequest::Do() throw(GeneralException) { if (!bad) { // Nous vérifions le domaine. - if (domain != "") { - bad = true; - // Les domaines par défaut valides sont '/', '/bin' et '/image'. - if (domain == "/image") bad = false; - if (domain == "/bin") bad = false; - if (domain == "/") bad = false; - if ((d = Domain::find_domain(Uri))) bad = false; - if (bad) { - std::cerr << _("Error: bad domain.\n"); - } - } else { - // L'url sans domaine ni fichier est valide. (cela arrive sur certains navigateurs...) - bad = (file != ""); + bad = true; + // Les domaines par défaut valides sont '/', '/bin' et '/image'. + if (domain == "/image") bad = false; + if (domain == "/bin") bad = false; + if (domain == "/") bad = false; + // L'url sans domaine ni fichier est valide. (cela arrive sur certains navigateurs...) + if (domain == "") bad = (file != ""); + if ((d = Domain::find_domain(Uri))) bad = false; + if (bad) { + std::cerr << _("Error: bad domain.\n"); } } -- cgit v1.2.3