diff options
author | pixel <pixel> | 2007-06-13 07:01:28 +0000 |
---|---|---|
committer | pixel <pixel> | 2007-06-13 07:01:28 +0000 |
commit | 54ce40b6cbe345de9ee0075ae4f265d6f7bcf7d5 (patch) | |
tree | f57807c3d6f74c7bc8c7b63630802727dd7c2041 /lib | |
parent | accbc901da85d9a6164a7745ba51a114fad722d6 (diff) |
Slightly changing domain checking behavior - now / is allowed to served
by the new request system.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/HttpServ.cc | 25 |
1 files changed, 11 insertions, 14 deletions
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"); } } |