View | Details | Raw Unified | Return to bug 240542 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-9 / +4 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	mod_scgi
4
PORTNAME=	mod_scgi
5
PORTVERSION=	1.15
5
PORTVERSION=	2.0
6
CATEGORIES=	www
6
CATEGORIES=	www
7
MASTER_SITES=	http://python.ca/scgi/releases/
7
MASTER_SITES=	http://python.ca/scgi/releases/
8
DISTNAME=	scgi-${PORTVERSION:S/.a/a/}
8
DISTNAME=	scgi-${PORTVERSION:S/.a/a/}
Lines 13-29 Link Here
13
LICENSE=	MIT
13
LICENSE=	MIT
14
LICENSE_FILE=	${WRKDIR}/${DISTNAME}/LICENSE.txt
14
LICENSE_FILE=	${WRKDIR}/${DISTNAME}/LICENSE.txt
15
15
16
USES=		apache:2.4
17
16
SCGI_DIR=	apache2
18
SCGI_DIR=	apache2
17
WRKSRC=		${WRKDIR}/${DISTNAME}/${SCGI_DIR}
19
WRKSRC=		${WRKDIR}/${DISTNAME}/${SCGI_DIR}
18
20
19
USES=		apache:2.2+
20
AP_FAST_BUILD=	yes
21
AP_FAST_BUILD=	yes
21
AP_GENPLIST=	yes
22
AP_GENPLIST=	yes
22
23
23
.include <bsd.port.pre.mk>
24
.include <bsd.port.mk>
24
25
.if ${APACHE_VERSION} == 2.4
26
EXTRA_PATCHES=	${FILESDIR}/apache24-compat-mod__scgi.c
27
.endif
28
29
.include <bsd.port.post.mk>
(-)distinfo (-2 / +3 lines)
Lines 1-2 Link Here
1
SHA256 (scgi-1.15.tar.gz) = e6cd197b089cca6478e9995ed076975756c30ebb903aabce912f404ee75a6d6f
1
TIMESTAMP = 1568303948
2
SIZE (scgi-1.15.tar.gz) = 32984
2
SHA256 (scgi-2.0.tar.gz) = fc59ec13cb989d14216e78426a2f84bd3d46f712a35bca0f4806cd3c38050a72
3
SIZE (scgi-2.0.tar.gz) = 32726
(-)files/apache24-compat-mod__scgi.c (-49 lines)
Lines 1-49 Link Here
1
--- mod_scgi.c.orig	2009-11-21 23:02:06 UTC
2
+++ mod_scgi.c
3
@@ -135,16 +135,16 @@ static int scgi_map_location(request_rec
4
     return DECLINED;
5
 }
6
 
7
-static void log_err(const char *file, int line, request_rec *r,
8
+static void log_err(const char *file, int line, int index, request_rec *r,
9
                     apr_status_t status, const char *msg)
10
 {
11
-    ap_log_rerror(file, line, APLOG_ERR, status, r, "scgi: %s", msg);
12
+    ap_log_rerror(file, line, index, APLOG_ERR, status, r, "scgi: %s", msg);
13
 }
14
 
15
-static void log_debug(const char *file, int line, request_rec *r, const
16
+static void log_debug(const char *file, int line, int index, request_rec *r, const
17
                       char *msg)
18
 {
19
-    ap_log_rerror(file, line, APLOG_DEBUG, APR_SUCCESS, r, msg);
20
+    ap_log_rerror(file, line, index, APLOG_DEBUG, APR_SUCCESS, r, "%s", msg);
21
 }
22
 
23
 static char *http2env(apr_pool_t *p, const char *name)
24
@@ -312,7 +312,7 @@ send_headers(request_rec *r, struct sock
25
     int i;
26
     apr_status_t rv = 0;
27
     apr_port_t  port = 0;
28
-    GET_PORT(port, r->connection->remote_addr);
29
+    GET_PORT(port, r->useragent_addr);
30
 
31
     log_debug(APLOG_MARK,r, "sending headers");
32
     t = apr_table_make(r->pool, 40);
33
@@ -324,14 +324,14 @@ send_headers(request_rec *r, struct sock
34
 	    buf = "0";
35
     add_header(t, "CONTENT_LENGTH",  buf);
36
     add_header(t, "SCGI", SCGI_PROTOCOL_VERSION);
37
-    add_header(t, "SERVER_SOFTWARE", ap_get_server_version());
38
+    add_header(t, "SERVER_SOFTWARE", ap_get_server_banner());
39
     add_header(t, "SERVER_PROTOCOL", r->protocol);
40
     add_header(t, "SERVER_NAME", ap_get_server_name(r));
41
     add_header(t, "SERVER_ADMIN", r->server->server_admin);
42
     add_header(t, "SERVER_ADDR", r->connection->local_ip);
43
     add_header(t, "SERVER_PORT", apr_psprintf(r->pool, "%u",
44
                                               ap_get_server_port(r)));
45
-    add_header(t, "REMOTE_ADDR", r->connection->remote_ip);
46
+    add_header(t, "REMOTE_ADDR", r->useragent_ip);
47
     add_header(t, "REMOTE_PORT", apr_psprintf(r->pool, "%d", port));
48
     add_header(t, "REMOTE_USER", r->user);
49
     add_header(t, "REQUEST_METHOD", r->method);

Return to bug 240542