diff options
Diffstat (limited to 'lib/HttpServ.cc')
-rw-r--r-- | lib/HttpServ.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/HttpServ.cc b/lib/HttpServ.cc index ec320bc..80448a8 100644 --- a/lib/HttpServ.cc +++ b/lib/HttpServ.cc @@ -253,6 +253,8 @@ int ProcessRequest::Do() throw(GeneralException) { if (file == "favicon.ico") { domain = "/image"; } + + regmatch_t pmatches[MAX_MATCHES]; if (!bad) { // Nous vérifions le domaine. @@ -263,7 +265,7 @@ int ProcessRequest::Do() throw(GeneralException) { 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 ((d = Domain::find_domain(Uri, MAX_MATCHES, pmatches))) bad = false; if (bad) { printm(M_INFO, _("Error: bad domain.\n")); } @@ -286,6 +288,7 @@ int ProcessRequest::Do() throw(GeneralException) { request.lport = s.GetPort(); request.dport = s.GetDistantPort(); request.method = Method; + memcpy(request.pmatches, pmatches, sizeof(regmatch_t) * MAX_MATCHES); d->Do(request, &response); a = response.BuildResponse(&s); } else if (((domain == "") || (domain == "/")) && (file == "")) { |