Lines 135-150
Link Here
|
135 |
return DECLINED; |
135 |
return DECLINED; |
136 |
} |
136 |
} |
137 |
|
137 |
|
138 |
static void log_err(const char *file, int line, request_rec *r, |
138 |
static void log_err(const char *file, int line, int index, request_rec *r, |
139 |
apr_status_t status, const char *msg) |
139 |
apr_status_t status, const char *msg) |
140 |
{ |
140 |
{ |
141 |
ap_log_rerror(file, line, APLOG_ERR, status, r, "scgi: %s", msg); |
141 |
ap_log_rerror(file, line, index, APLOG_ERR, status, r, "scgi: %s", msg); |
142 |
} |
142 |
} |
143 |
|
143 |
|
144 |
static void log_debug(const char *file, int line, request_rec *r, const |
144 |
static void log_debug(const char *file, int line, int index, request_rec *r, const |
145 |
char *msg) |
145 |
char *msg) |
146 |
{ |
146 |
{ |
147 |
ap_log_rerror(file, line, APLOG_DEBUG, APR_SUCCESS, r, msg); |
147 |
ap_log_rerror(file, line, index, APLOG_DEBUG, APR_SUCCESS, r, "%s", msg); |
148 |
} |
148 |
} |
149 |
|
149 |
|
150 |
static char *http2env(apr_pool_t *p, const char *name) |
150 |
static char *http2env(apr_pool_t *p, const char *name) |
Lines 312-318
Link Here
|
312 |
int i; |
312 |
int i; |
313 |
apr_status_t rv = 0; |
313 |
apr_status_t rv = 0; |
314 |
apr_port_t port = 0; |
314 |
apr_port_t port = 0; |
315 |
GET_PORT(port, r->connection->remote_addr); |
315 |
GET_PORT(port, r->useragent_addr); |
316 |
|
316 |
|
317 |
log_debug(APLOG_MARK,r, "sending headers"); |
317 |
log_debug(APLOG_MARK,r, "sending headers"); |
318 |
t = apr_table_make(r->pool, 40); |
318 |
t = apr_table_make(r->pool, 40); |
Lines 324-337
Link Here
|
324 |
buf = "0"; |
324 |
buf = "0"; |
325 |
add_header(t, "CONTENT_LENGTH", buf); |
325 |
add_header(t, "CONTENT_LENGTH", buf); |
326 |
add_header(t, "SCGI", SCGI_PROTOCOL_VERSION); |
326 |
add_header(t, "SCGI", SCGI_PROTOCOL_VERSION); |
327 |
add_header(t, "SERVER_SOFTWARE", ap_get_server_version()); |
327 |
add_header(t, "SERVER_SOFTWARE", ap_get_server_banner()); |
328 |
add_header(t, "SERVER_PROTOCOL", r->protocol); |
328 |
add_header(t, "SERVER_PROTOCOL", r->protocol); |
329 |
add_header(t, "SERVER_NAME", ap_get_server_name(r)); |
329 |
add_header(t, "SERVER_NAME", ap_get_server_name(r)); |
330 |
add_header(t, "SERVER_ADMIN", r->server->server_admin); |
330 |
add_header(t, "SERVER_ADMIN", r->server->server_admin); |
331 |
add_header(t, "SERVER_ADDR", r->connection->local_ip); |
331 |
add_header(t, "SERVER_ADDR", r->connection->local_ip); |
332 |
add_header(t, "SERVER_PORT", apr_psprintf(r->pool, "%u", |
332 |
add_header(t, "SERVER_PORT", apr_psprintf(r->pool, "%u", |
333 |
ap_get_server_port(r))); |
333 |
ap_get_server_port(r))); |
334 |
add_header(t, "REMOTE_ADDR", r->connection->remote_ip); |
334 |
add_header(t, "REMOTE_ADDR", r->useragent_ip); |
335 |
add_header(t, "REMOTE_PORT", apr_psprintf(r->pool, "%d", port)); |
335 |
add_header(t, "REMOTE_PORT", apr_psprintf(r->pool, "%d", port)); |
336 |
add_header(t, "REMOTE_USER", r->user); |
336 |
add_header(t, "REMOTE_USER", r->user); |
337 |
add_header(t, "REQUEST_METHOD", r->method) |
337 |
add_header(t, "REQUEST_METHOD", r->method) |