From 06a719b075fbeea7b54ebe30595b959ed66ad687 Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 28 Sep 2007 09:05:34 +0000 Subject: Having the ability for Lua to handle root. --- lib/HttpServ.cc | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'lib') diff --git a/lib/HttpServ.cc b/lib/HttpServ.cc index ecd62c5..6f4f046 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.55 2007-08-29 11:17:08 pixel Exp $ */ +/* $Id: HttpServ.cc,v 1.56 2007-09-28 09:05:34 pixel Exp $ */ #include "sha1.h" #ifdef HAVE_CONFIG_H @@ -197,7 +197,21 @@ int ProcessRequest::Do() throw(GeneralException) { if (bad) { ShowError(&b); } else { - if (((domain == "") || (domain == "/")) && (file == "")) { + if (d) { + HttpRequest request; + request.vars = Vars; + request.headers = Heads; + request.uri = Uri; + request.login = login; + request.password = password; + request.lip = s.GetAddr(); + request.dip = s.GetDistantAddr(); + request.lport = s.GetPort(); + request.dport = s.GetDistantPort(); + request.method = Method; + d->Do(request, &response); + a = response.BuildResponse(&s); + } else if (((domain == "") || (domain == "/")) && (file == "")) { // Si le navigateur a demandé l'URL '/', alors on renvoie une notification // de redirection. SendRedirect(&b); @@ -224,20 +238,6 @@ int ProcessRequest::Do() throw(GeneralException) { ShowError(&b); std::cerr << _("File not found, error shown.\n"); } - } else if (d) { - HttpRequest request; - request.vars = Vars; - request.headers = Heads; - request.uri = Uri; - request.login = login; - request.password = password; - request.lip = s.GetAddr(); - request.dip = s.GetDistantAddr(); - request.lport = s.GetPort(); - request.dport = s.GetDistantPort(); - request.method = Method; - d->Do(request, &response); - a = response.BuildResponse(&s); } else { ShowError(&b); } -- cgit v1.2.3