Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: commits
[3414] cherokee/trunk: Adds a new Virtual Server matching plug-in.
 

Index | Next | Previous | View Flat


cherokee at cherokee-project

Jul 2, 2009, 1:18 AM


Views: 101
Permalink
[3414] cherokee/trunk: Adds a new Virtual Server matching plug-in.

Revision: 3414
http://svn.cherokee-project.com/changeset/3414
Author: alo
Date: 2009-07-02 10:18:40 +0200 (Thu, 02 Jul 2009)

Log Message:
-----------
Adds a new Virtual Server matching plug-in. It allows to choose a
Virtual Server based on the target IP of the TCP connection rather
than on the HTTP "Host:" header.

Modified Paths:
--------------
cherokee/trunk/admin/Form.py
cherokee/trunk/admin/Makefile.am
cherokee/trunk/admin/ModuleRehost.py
cherokee/trunk/admin/ModuleWildcard.py
cherokee/trunk/admin/PageVServer.py
cherokee/trunk/admin/PageVServers.py
cherokee/trunk/admin/consts.py
cherokee/trunk/cherokee/Makefile.am
cherokee/trunk/cherokee/connection.c
cherokee/trunk/cherokee/server-protected.h
cherokee/trunk/cherokee/server.c
cherokee/trunk/cherokee/vrule.c
cherokee/trunk/cherokee/vrule.h
cherokee/trunk/cherokee/vrule_rehost.c
cherokee/trunk/cherokee/vrule_wildcard.c
cherokee/trunk/configure.in

Added Paths:
-----------
cherokee/trunk/admin/ModuleTargetIp.py
cherokee/trunk/cherokee/vrule_target_ip.c
cherokee/trunk/cherokee/vrule_target_ip.h

Modified: cherokee/trunk/admin/Form.py
===================================================================
--- cherokee/trunk/admin/Form.py 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/admin/Form.py 2009-07-02 08:18:40 UTC (rev 3414)
@@ -201,9 +201,9 @@
def InstanceLinkedImage (self, name, alt, link, **kwargs):
return self.InstanceLink(link, self.InstanceImage(name, alt, **kwargs))

- def AddDeleteLink (self, url, key):
+ def AddDeleteLink (self, url, key, **kwargs):
js = "javascript:post_del_key('%s', '%s');" % (url, key)
- return self.InstanceLinkedImage("bin.png", _("Delete"), js, border="0")
+ return self.InstanceLinkedImage("bin.png", _("Delete"), js, border="0", **kwargs)

def InstanceOptions (self, cfg_key, options, *args, **kwargs):
value = self._cfg.get_val (cfg_key)

Modified: cherokee/trunk/admin/Makefile.am
===================================================================
--- cherokee/trunk/admin/Makefile.am 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/admin/Makefile.am 2009-07-02 08:18:40 UTC (rev 3414)
@@ -100,6 +100,7 @@
ModuleCustomError.py \
ModuleWildcard.py \
ModuleRehost.py \
+ModuleTargetIp.py \
ModuleEvhost.py \
config.py \
pyscgi.py \

Modified: cherokee/trunk/admin/ModuleRehost.py
===================================================================
--- cherokee/trunk/admin/ModuleRehost.py 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/admin/ModuleRehost.py 2009-07-02 08:18:40 UTC (rev 3414)
@@ -9,7 +9,11 @@
NOTE_REHOST = N_("Regular Expression against which the hosts be Host name will be compared.")
WARNING_EMPTY = N_("At least one Regular Expression string must be defined.")

+DATA_VALIDATION = []
+
class ModuleRehost (Module, FormHelper):
+ PROPERTIES = ['regex']
+
def __init__ (self, cfg, prefix, submit_url):
FormHelper.__init__ (self, 'rehost', cfg)
Module.__init__ (self, 'rehost', cfg, prefix, submit_url)
@@ -32,7 +36,10 @@
domain = cfg_domains[i].value
cfg_key = "%s!%s" % (pre, i)
en = self.InstanceEntry (cfg_key, 'text')
- link_del = self.AddDeleteLink ('/ajax/update', cfg_key)
+ if len(cfg_domains.keys()) >= 2:
+ link_del = self.AddDeleteLink ('/ajax/update', cfg_key)
+ else:
+ link_del = ''
table += (en, link_del)

txt += self.Indent(table)
@@ -54,3 +61,6 @@
txt += self.Indent(table)

return txt
+
+ def _op_apply_changes (self, uri, post):
+ self.ApplyChangesPrefix (self._prefix, [], post, DATA_VALIDATION)

Added: cherokee/trunk/admin/ModuleTargetIp.py
===================================================================
--- cherokee/trunk/admin/ModuleTargetIp.py (rev 0)
+++ cherokee/trunk/admin/ModuleTargetIp.py 2009-07-02 08:18:40 UTC (rev 3414)
@@ -0,0 +1,68 @@
+from Form import *
+from Table import *
+from Module import *
+import validations
+
+# For gettext
+N_ = lambda x: x
+
+NOTE_ADDRESS = N_("IP or Subnet of the NIC that accepted the request. Example: ::1, or 10.0.0.0/8")
+WARNING_EMPTY = N_("At least one IP or Subnet entry must be defined.")
+
+DATA_VALIDATION = [
+ ('vserver!.+?!match!to!.+', validations.is_ip_or_netmask)
+]
+
+class ModuleTargetIp (Module, FormHelper):
+ PROPERTIES = ['ip']
+
+ def __init__ (self, cfg, prefix, submit_url):
+ FormHelper.__init__ (self, 'target_ip', cfg)
+ Module.__init__ (self, 'target_ip', cfg, prefix, submit_url)
+
+ def _op_render (self):
+ txt = ''
+ pre = '%s!to'%(self._prefix)
+ cfg_addresses = self._cfg[pre]
+
+ available = "1"
+
+ txt += "<h2>%s</h2>" % (_('Accepted Server IP addresses and subnets'))
+ if cfg_addresses and \
+ cfg_addresses.has_child():
+ table = Table(2,1)
+ table += (_('IP or Subnet'), '')
+
+ # Build list
+ for i in cfg_addresses:
+ domain = cfg_addresses[i].value
+ cfg_key = "%s!%s" % (pre, i)
+ en = self.InstanceEntry (cfg_key, 'text')
+ if len(cfg_addresses.keys()) >= 2:
+ link_del = self.AddDeleteLink ('/ajax/update', cfg_key)
+ else:
+ link_del = ''
+ table += (en, link_del)
+
+ txt += self.Indent(table)
+ txt += "<br />"
+ else:
+ txt += self.Dialog(WARNING_EMPTY, 'warning')
+
+ # Look for firs available
+ i = 1
+ while cfg_addresses:
+ if not cfg_addresses[str(i)]:
+ available = str(i)
+ break
+ i += 1
+
+ table = TableProps()
+ self.AddPropEntry (table, _('New IP/Subnet'), '%s!%s'%(pre, available), _(NOTE_ADDRESS))
+ txt += "<h3>%s</h3>" % (_('Add new'))
+ txt += self.Indent(table)
+
+ return txt
+
+ def _op_apply_changes (self, uri, post):
+ self.ApplyChangesPrefix (self._prefix, [], post, DATA_VALIDATION)

Modified: cherokee/trunk/admin/ModuleWildcard.py
===================================================================
--- cherokee/trunk/admin/ModuleWildcard.py 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/admin/ModuleWildcard.py 2009-07-02 08:18:40 UTC (rev 3414)
@@ -9,7 +9,11 @@
NOTE_WILDCARD = N_("Accepted host name. Wildcard characters (* and ?) are allowed. Eg: *example.com")
WARNING_EMPTY = N_("At least one wildcard string must be defined.")

+DATA_VALIDATION = []
+
class ModuleWildcard (Module, FormHelper):
+ PROPERTIES = ['domain']
+
def __init__ (self, cfg, prefix, submit_url):
FormHelper.__init__ (self, 'wildcard', cfg)
Module.__init__ (self, 'wildcard', cfg, prefix, submit_url)
@@ -32,7 +36,10 @@
domain = cfg_domains[i].value
cfg_key = "%s!%s" % (pre, i)
en = self.InstanceEntry (cfg_key, 'text')
- link_del = self.AddDeleteLink ('/ajax/update', cfg_key)
+ if len(cfg_domains.keys()) >= 2:
+ link_del = self.AddDeleteLink ('/ajax/update', cfg_key)
+ else:
+ link_del = ''
table += (en, link_del)

txt += self.Indent(table)
@@ -54,3 +61,6 @@
txt += self.Indent(table)

return txt
+
+ def _op_apply_changes (self, uri, post):
+ self.ApplyChangesPrefix (self._prefix, [], post, DATA_VALIDATION)

Modified: cherokee/trunk/admin/PageVServer.py
===================================================================
--- cherokee/trunk/admin/PageVServer.py 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/admin/PageVServer.py 2009-07-02 08:18:40 UTC (rev 3414)
@@ -642,6 +642,9 @@
# EVHost
self.ApplyChanges_OptionModule ('%s!evhost'%(pre), uri, post)

+ # EVHost
+ self.ApplyChanges_OptionModule ('%s!match'%(pre), uri, post)
+
# Look for the checkboxes
checkboxes = ['%s!keepalive'%(pre),
'%s!collect_statistics'%(pre),

Modified: cherokee/trunk/admin/PageVServers.py
===================================================================
--- cherokee/trunk/admin/PageVServers.py 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/admin/PageVServers.py 2009-07-02 08:18:40 UTC (rev 3414)
@@ -156,6 +156,8 @@
skey = 'regex'
elif hmatchtype == 'wildcard':
skey = 'domain'
+ elif hmatchtype == 'target_ip':
+ skey = 'ip'
else:
doms = 1


Modified: cherokee/trunk/admin/consts.py
===================================================================
--- cherokee/trunk/admin/consts.py 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/admin/consts.py 2009-07-02 08:18:40 UTC (rev 3414)
@@ -138,7 +138,8 @@
VRULES = [.
('', N_('Choose..')),
('wildcard', N_('Wildcards')),
- ('rehost', N_('Regular Expressions'))
+ ('rehost', N_('Regular Expressions')),
+ ('target_ip', N_('Server IP'))
]

EXPIRATION_TYPE = [

Modified: cherokee/trunk/cherokee/Makefile.am
===================================================================
--- cherokee/trunk/cherokee/Makefile.am 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/cherokee/Makefile.am 2009-07-02 08:18:40 UTC (rev 3414)
@@ -356,6 +356,24 @@


#
+# VRule Target IP
+#
+vrule_target_ip = \
+vrule_target_ip.c \
+vrule_target_ip.h
+
+libplugin_target_ip_la_LDFLAGS = $(module_ldflags)
+libplugin_target_ip_la_SOURCES = $(vrule_target_ip)
+
+if STATIC_VRULE_TARGET_IP
+static_vrule_target_ip_src = $(vrule_target_ip)
+else
+dynamic_vrule_target_ip_lib = libplugin_target_ip.la
+endif
+
+
+
+#
# Gen wildcard
#
gen_evhost = \
@@ -1351,6 +1369,7 @@
\
$(static_vrule_wildcard_src) \
$(static_vrule_rehost_src) \
+$(static_vrule_target_ip_src) \
\
$(static_gen_evhost_src) \
\
@@ -1530,6 +1549,7 @@
$(dynamic_rule_or_lib) \
$(dynamic_vrule_wildcard_lib) \
$(dynamic_vrule_rehost_lib) \
+$(dynamic_vrule_target_ip_lib) \
$(dynamic_gen_evhost_lib) \
$(dynamic_handler_file_lib) \
$(dynamic_handler_cgi_lib) \

Modified: cherokee/trunk/cherokee/connection.c
===================================================================
--- cherokee/trunk/cherokee/connection.c 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/cherokee/connection.c 2009-07-02 08:18:40 UTC (rev 3414)
@@ -1894,7 +1894,7 @@

/* Set the virtual server reference
*/
- ret = cherokee_server_get_vserver (CONN_SRV(conn), &conn->host,
+ ret = cherokee_server_get_vserver (CONN_SRV(conn), &conn->host, conn,
(cherokee_virtual_server_t **)&conn->vserver);
if (unlikely (ret != ret_ok)) {
LOG_ERROR ("Couldn't get virtual server: '%s'\n", conn->host.buf);

Modified: cherokee/trunk/cherokee/server-protected.h
===================================================================
--- cherokee/trunk/cherokee/server-protected.h 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/cherokee/server-protected.h 2009-07-02 08:18:40 UTC (rev 3414)
@@ -175,7 +175,7 @@


ret_t cherokee_server_del_connection (cherokee_server_t *srv, char *begin);
-ret_t cherokee_server_get_vserver (cherokee_server_t *srv, cherokee_buffer_t *name, cherokee_virtual_server_t **vsrv);
+ret_t cherokee_server_get_vserver (cherokee_server_t *srv, cherokee_buffer_t *name, cherokee_connection_t *conn, cherokee_virtual_server_t **vsrv);
ret_t cherokee_server_get_next_bind (cherokee_server_t *srv, cherokee_bind_t *bind, cherokee_bind_t **next);
ret_t cherokee_server_get_log_writer (cherokee_server_t *srv, cherokee_config_node_t *config, cherokee_logger_writer_t **writer);


Modified: cherokee/trunk/cherokee/server.c
===================================================================
--- cherokee/trunk/cherokee/server.c 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/cherokee/server.c 2009-07-02 08:18:40 UTC (rev 3414)
@@ -1889,6 +1889,7 @@
ret_t
cherokee_server_get_vserver (cherokee_server_t *srv,
cherokee_buffer_t *host,
+ cherokee_connection_t *conn,
cherokee_virtual_server_t **vsrv)
{
int re;
@@ -1904,7 +1905,7 @@
if (! vserver->matching)
continue;

- ret = cherokee_vrule_match (vserver->matching, host);
+ ret = cherokee_vrule_match (vserver->matching, host, conn);
if (ret == ret_ok) {
TRACE (ENTRIES, "Virtual server '%s' matched vrule\n", vserver->name.buf);
*vsrv = vserver;

Modified: cherokee/trunk/cherokee/vrule.c
===================================================================
--- cherokee/trunk/cherokee/vrule.c 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/cherokee/vrule.c 2009-07-02 08:18:40 UTC (rev 3414)
@@ -88,13 +88,14 @@

ret_t
cherokee_vrule_match (cherokee_vrule_t *vrule,
- cherokee_buffer_t *buffer)
+ cherokee_buffer_t *buffer,
+ void *conn)
{
return_if_fail (vrule, ret_error);
return_if_fail (vrule->match, ret_error);

/* Call the real method
*/
- return vrule->match (vrule, buffer);
+ return vrule->match (vrule, buffer, conn);
}


Modified: cherokee/trunk/cherokee/vrule.h
===================================================================
--- cherokee/trunk/cherokee/vrule.h 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/cherokee/vrule.h 2009-07-02 08:18:40 UTC (rev 3414)
@@ -44,7 +44,7 @@
*/
typedef ret_t (* vrule_func_new_t) (void **vrule);
typedef ret_t (* vrule_func_configure_t) (void *vrule, cherokee_config_node_t *conf, void *vsrv);
-typedef ret_t (* vrule_func_match_t) (void *vrule, cherokee_buffer_t *host);
+typedef ret_t (* vrule_func_match_t) (void *vrule, cherokee_buffer_t *host, void *conn);

/* Data types
*/
@@ -84,7 +84,7 @@

/* Vrule virtual methods
*/
-ret_t cherokee_vrule_match (cherokee_vrule_t *vrule, cherokee_buffer_t *host);
+ret_t cherokee_vrule_match (cherokee_vrule_t *vrule, cherokee_buffer_t *host, void *conn);
ret_t cherokee_vrule_configure (cherokee_vrule_t *vrule, cherokee_config_node_t *conf, void *vsrv);

CHEROKEE_END_DECLS

Modified: cherokee/trunk/cherokee/vrule_rehost.c
===================================================================
--- cherokee/trunk/cherokee/vrule_rehost.c 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/cherokee/vrule_rehost.c 2009-07-02 08:18:40 UTC (rev 3414)
@@ -37,11 +37,14 @@

static ret_t
match (cherokee_vrule_rehost_t *vrule,
- cherokee_buffer_t *host)
+ cherokee_buffer_t *host,
+ cherokee_connection_t *conn)
{
int re;
cherokee_list_t *i;

+ UNUSED(conn);
+
list_for_each (i, &vrule->pcre_list) {
pcre *regex = LIST_ITEM_INFO(i);


Added: cherokee/trunk/cherokee/vrule_target_ip.c
===================================================================
--- cherokee/trunk/cherokee/vrule_target_ip.c (rev 0)
+++ cherokee/trunk/cherokee/vrule_target_ip.c 2009-07-02 08:18:40 UTC (rev 3414)
@@ -0,0 +1,145 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/* Cherokee
+ *
+ * Authors:
+ * Alvaro Lopez Ortega <alvaro[at]alobbs.com>
+ *
+ * Copyright (C) 2001-2009 Alvaro Lopez Ortega
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+#include "common-internal.h"
+#include "vrule_target_ip.h"
+#include "plugin_loader.h"
+#include "connection.h"
+#include "connection-protected.h"
+#include "util.h"
+
+#define ENTRIES "vrule,target_ip,ip"
+
+PLUGIN_INFO_VRULE_EASIEST_INIT(target_ip);
+
+
+static ret_t
+match (cherokee_vrule_target_ip_t *vrule,
+ cherokee_buffer_t *host,
+ cherokee_connection_t *conn)
+{
+ int re;
+ ret_t ret;
+ cherokee_socket_t sock;
+
+ ret = cherokee_socket_init (&sock);
+ if (unlikely(ret != ret_ok))
+ return ret_error;
+
+ /* Copy the server IP
+ */
+ sock.client_addr = conn->socket.client_addr;
+
+ re = getsockname (SOCKET_FD(&conn->socket),
+ (struct sockaddr *) &(sock.client_addr),
+ &sock.client_addr_len);
+ if (re != 0) {
+ TRACE(ENTRIES, "VRule target_ip could %s get the server IP\n", "not");
+ goto deny;
+ }
+
+ /* Validate it
+ */
+ ret = cherokee_access_ip_match (&vrule->access, &sock);
+ if (ret != ret_ok) {
+ TRACE(ENTRIES, "VRule target_ip did %s match any\n", "not");
+ goto deny;
+ }
+
+ TRACE(ENTRIES, "Rule from matched %s", "\n");
+ return ret_ok;
+deny:
+
+ cherokee_socket_mrproper (&sock);
+ return ret_deny;
+}
+
+static ret_t
+configure (cherokee_vrule_target_ip_t *vrule,
+ cherokee_config_node_t *conf,
+ cherokee_virtual_server_t *vsrv)
+{
+ ret_t ret;
+ cherokee_list_t *i;
+ cherokee_config_node_t *subconf;
+
+ UNUSED(vsrv);
+
+ ret = cherokee_config_node_get (conf, "to", &subconf);
+ if (ret != ret_ok) {
+ LOG_CRITICAL ("Rule prio=%d needs an 'to' property\n",
+ VRULE(vrule)->priority);
+ return ret_error;
+ }
+
+ cherokee_config_node_foreach (i, subconf) {
+ cherokee_config_node_t *subconf2 = CONFIG_NODE(i);
+
+ ret = cherokee_access_add (&vrule->access, subconf2->val.buf);
+ if (ret != ret_ok) {
+ LOG_ERROR ("Couldn't parse 'to' entry: '%s'\n", subconf2->val.buf);
+ return ret_error;
+ }
+ }
+
+ return ret_ok;
+}
+
+static ret_t
+_free (void *p)
+{
+ cherokee_vrule_target_ip_t *vrule = p;
+
+ cherokee_access_mrproper (&vrule->access);
+ return ret_ok;
+}
+
+
+ret_t
+cherokee_vrule_target_ip_new (cherokee_vrule_t **vrule)
+{
+ ret_t ret;
+
+ CHEROKEE_NEW_STRUCT (n, vrule_target_ip);
+
+ /* Parent class constructor
+ */
+ cherokee_vrule_init_base (VRULE(n), PLUGIN_INFO_PTR(target_ip));
+
+ /* Virtual methos
+ */
+ VRULE(n)->match = (vrule_func_match_t) match;
+ VRULE(n)->configure = (vrule_func_configure_t) configure;
+ MODULE(n)->free = (module_func_free_t) _free;
+
+ /* Properties
+ */
+ ret = cherokee_access_init (&n->access);
+ if (ret != ret_ok) {
+ return ret_error;
+ }
+
+ *vrule = VRULE(n);
+ return ret_ok;
+}

Added: cherokee/trunk/cherokee/vrule_target_ip.h
===================================================================
--- cherokee/trunk/cherokee/vrule_target_ip.h (rev 0)
+++ cherokee/trunk/cherokee/vrule_target_ip.h 2009-07-02 08:18:40 UTC (rev 3414)
@@ -0,0 +1,49 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/* Cherokee
+ *
+ * Authors:
+ * Alvaro Lopez Ortega <alvaro[at]alobbs.com>
+ *
+ * Copyright (C) 2001-2009 Alvaro Lopez Ortega
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301, USA.
+ */
+
+#if !defined (CHEROKEE_INSIDE_CHEROKEE_H) && !defined (CHEROKEE_COMPILATION)
+# error "Only <cherokee/cherokee.h> can be included directly, this file may disappear or change contents."
+#endif
+
+#ifndef CHEROKEE_VRULE_TARGET_IP_H
+#define CHEROKEE_VRULE_TARGET_IP_H
+
+#include <cherokee/common.h>
+#include <cherokee/vrule.h>
+#include <cherokee/access.h>
+
+CHEROKEE_BEGIN_DECLS
+
+typedef struct {
+ cherokee_vrule_t rule;
+ cherokee_access_t access;
+} cherokee_vrule_target_ip_t;
+
+#define VRULE_TARGET_IP(x) ((cherokee_vrule_target_ip_t *)(x))
+
+ret_t cherokee_vrule_target_ip_new (cherokee_vrule_t **vrule);
+
+CHEROKEE_END_DECLS
+
+#endif /* CHEROKEE_VRULE_TARGET_IP_H */

Modified: cherokee/trunk/cherokee/vrule_wildcard.c
===================================================================
--- cherokee/trunk/cherokee/vrule_wildcard.c 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/cherokee/vrule_wildcard.c 2009-07-02 08:18:40 UTC (rev 3414)
@@ -74,13 +74,16 @@
*/

static ret_t
-match (cherokee_vrule_wildcard_t *vrule,
- cherokee_buffer_t *host)
+match (cherokee_vrule_wildcard_t *vrule,
+ cherokee_buffer_t *host,
+ cherokee_connection_t *conn)
{
int re;
ret_t ret;
cherokee_list_t *i;

+ UNUSED(conn);
+
list_for_each (i, &vrule->entries) {
cherokee_wc_entry_t *entry = (cherokee_wc_entry_t *)i;


Modified: cherokee/trunk/configure.in
===================================================================
--- cherokee/trunk/configure.in 2009-07-01 17:58:18 UTC (rev 3413)
+++ cherokee/trunk/configure.in 2009-07-02 08:18:40 UTC (rev 3414)
@@ -1292,7 +1292,7 @@
AC_HELP_STRING([--enable-static-module=MODULE][]),
[use_static_module="$use_static_module $enableval "],[])

-modules="error_redir error_nn server_info file admin dirlist fcgi fastcgi scgi redir common cgi phpcgi proxy mirror ssi secdownload empty_gif custom_error dbslayer streaming gzip deflate ncsa combined custom pam ldap mysql htpasswd plain htdigest authlist round_robin ip_hash directory extensions request header exists fullpath method from bind geoip wildcard rehost evhost libssl not and or"
+modules="error_redir error_nn server_info file admin dirlist fcgi fastcgi scgi redir common cgi phpcgi proxy mirror ssi secdownload empty_gif custom_error dbslayer streaming gzip deflate ncsa combined custom pam ldap mysql htpasswd plain htdigest authlist round_robin ip_hash directory extensions request header exists fullpath method from bind geoip wildcard rehost target_ip evhost libssl not and or"

# Remove modules that will not be compiles
#
@@ -1395,6 +1395,7 @@
AM_CONDITIONAL(STATIC_RULE_GEOIP, grep geoip $conf_h >/dev/null)
AM_CONDITIONAL(STATIC_VRULE_WILDCARD, grep wildcard $conf_h >/dev/null)
AM_CONDITIONAL(STATIC_VRULE_REHOST, grep rehost $conf_h >/dev/null)
+AM_CONDITIONAL(STATIC_VRULE_TARGET_IP, grep target_ip $conf_h >/dev/null)
AM_CONDITIONAL(STATIC_GEN_EVHOST, grep evhost $conf_h >/dev/null)
# These must be at the end
AM_CONDITIONAL(STATIC_RULE_NOT, grep _not_ $conf_h >/dev/null)

Subject User Time
[3414] cherokee/trunk: Adds a new Virtual Server matching plug-in. cherokee at cherokee-project Jul 2, 2009, 1:18 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.