Line 0
Link Here
|
|
|
1 |
--- mod_scgi.c |
2 |
+++ mod_scgi.c |
3 |
@@ -135,16 +135,16 @@ |
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 @@ |
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 @@ |
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) |