summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Domain.h4
-rw-r--r--include/HttpServ.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/include/Domain.h b/include/Domain.h
index d091728..9cd8483 100644
--- a/include/Domain.h
+++ b/include/Domain.h
@@ -27,14 +27,14 @@ class Domain : public Base {
public:
Domain(const Regex &);
virtual ~Domain();
- static Domain * find_domain(const String & url);
+ static Domain * find_domain(const String & url, int nmatches = 0, regmatch_t * pmatches = 0);
void OnTop();
virtual void Do(const HttpRequest &, HttpResponse *) throw (GeneralException) = 0;
static Domain * First();
Domain * Next();
String GetPattern();
private:
- Domain * find_domain_r(const String & url);
+ Domain * find_domain_r(const String & url, int nmatches = 0, regmatch_t * pmatches = 0);
static Domain * head;
Domain * next, * prev;
Regex pattern;
diff --git a/include/HttpServ.h b/include/HttpServ.h
index 2b2e5da..d8283aa 100644
--- a/include/HttpServ.h
+++ b/include/HttpServ.h
@@ -27,6 +27,7 @@
#include <Buffer.h>
#include <Handle.h>
#include <Exceptions.h>
+#include <BRegex.h>
class HttpResponse : public Base {
public:
@@ -65,12 +66,15 @@ class HttpResponse : public Base {
bool already_prepared;
};
+#define MAX_MATCHES 64
+
class HttpRequest : public Base {
public:
Variables * vars, * headers;
String method, uri, login, password;
Uint32 lip, dip;
int lport, dport;
+ regmatch_t pmatches[MAX_MATCHES];
};
class Action;