- Add LICENSE_FILE

- Switch to options helpers
- Don't install useless INSTALL file
- Regenerate patch
- Update WWW

Approved by:	portmgr blanket
This commit is contained in:
Dmitry Marakasov 2019-09-10 09:02:50 +00:00
parent fd5dddaa8d
commit 90df10f54b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=511751
3 changed files with 13 additions and 12 deletions

View file

@ -14,17 +14,18 @@ MAINTAINER= ychsiao@ychsiao.org
COMMENT= Allows you to limit the number of simultaneous connexions
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= apache:2.2+ tar:bzip2
AP_FAST_BUILD= yes
AP_GENPLIST= yes
PORTDOCS= ChangeLog INSTALL README
PORTDOCS= ChangeLog README
OPTIONS_DEFINE= DOCS
post-install:
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}/

View file

@ -1,6 +1,6 @@
--- ./mod_limitipconn.c.orig 2012-04-26 00:19:48.000000000 +0200
+++ ./mod_limitipconn.c 2014-02-02 16:47:28.000000000 +0100
@@ -42,6 +42,9 @@
--- mod_limitipconn.c.orig 2012-04-25 22:19:48 UTC
+++ mod_limitipconn.c
@@ -42,6 +42,9 @@ typedef struct {
/* array of MIME types to limit check; all other types are exempt */
apr_array_header_t *excl_limit;
@ -10,7 +10,7 @@
} limitipconn_config;
static limitipconn_config *create_config(apr_pool_t *p)
@@ -53,6 +56,7 @@
@@ -53,6 +56,7 @@ static limitipconn_config *create_config(apr_pool_t *p
cfg->limit = 0;
cfg->no_limit = apr_array_make(p, 0, sizeof(char *));
cfg->excl_limit = apr_array_make(p, 0, sizeof(char *));
@ -18,7 +18,7 @@
return cfg;
}
@@ -75,6 +79,7 @@
@@ -75,6 +79,7 @@ static int check_limit(request_rec *r, limitipconn_con
/* convert Apache arrays to normal C arrays */
char **nolim = (char **) cfg->no_limit->elts;
char **exlim = (char **) cfg->excl_limit->elts;
@ -26,7 +26,7 @@
const char *address;
@@ -112,7 +117,7 @@
@@ -112,7 +117,7 @@ static int check_limit(request_rec *r, limitipconn_con
/* Only check the MIME-type if we have MIME-type stuff in our config.
The extra subreq can be quite expensive. */
@ -35,7 +35,7 @@
/* Look up the Content-type of this request. We need a subrequest
* here since this module might be called before the URI has been
* translated into a MIME type. */
@@ -129,6 +134,20 @@
@@ -129,6 +134,20 @@ static int check_limit(request_rec *r, limitipconn_con
"mod_limitipconn: uri: %s Content-Type: %s",
r->uri, content_type);
@ -56,7 +56,7 @@
/* Cycle through the exempt list; if our content_type is exempt,
* return OK */
#if AP_MODULE_MAGIC_AT_LEAST(20090131, 0)
@@ -328,6 +347,24 @@
@@ -328,6 +347,24 @@ static const char *excl_limit_config_cmd(cmd_parms *pa
return NULL;
}
@ -81,7 +81,7 @@
/* Array describing structure of configuration directives */
static command_rec limitipconn_cmds[] = {
AP_INIT_TAKE1("MaxConnPerIP", limit_config_cmd, NULL, OR_LIMIT|RSRC_CONF,
@@ -336,6 +373,8 @@
@@ -336,6 +373,8 @@ static command_rec limitipconn_cmds[] = {
"MIME types for which limit checking is disabled"),
AP_INIT_ITERATE("OnlyIPLimit", excl_limit_config_cmd, NULL,
OR_LIMIT|RSRC_CONF, "restrict limit checking to these MIME types only"),

View file

@ -3,4 +3,4 @@ to limit the number of simultaneous downloads permitted from a single
IP address.
Proxy tracking possibility is not supported yet since apache isn't patched.
WWW: http://dominia.org/djao/limitipconn2.html
WWW: https://dominia.org/djao/limitipconn2.html