mirror of https://github.com/nealey/eris.git
fix $REMOTE* and $SERVER_PROTOCOL
This commit is contained in:
parent
e991c1f24f
commit
e15c2d40a4
19
eris.c
19
eris.c
|
@ -75,9 +75,9 @@ int portappend = 0;
|
||||||
/* Variables that persist between requests */
|
/* Variables that persist between requests */
|
||||||
int cwd;
|
int cwd;
|
||||||
int keepalive = 0;
|
int keepalive = 0;
|
||||||
char remote_ip[60] = {0};
|
char *remote_ip = NULL;
|
||||||
char remote_port[10] = {0};
|
char *remote_port = NULL;
|
||||||
char remote_ident[80] = {0};
|
char *remote_ident = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Things that are really super convenient to have globally.
|
* Things that are really super convenient to have globally.
|
||||||
|
@ -214,15 +214,21 @@ get_ucspi_env()
|
||||||
|
|
||||||
strcpy(buf + protolen, "REMOTEIP");
|
strcpy(buf + protolen, "REMOTEIP");
|
||||||
p = getenv(buf);
|
p = getenv(buf);
|
||||||
strncpy(remote_ip, p, sizeof remote_ip);
|
if (p) {
|
||||||
|
remote_ip = strdup(p);
|
||||||
|
}
|
||||||
|
|
||||||
strcpy(buf + protolen, "REMOTEPORT");
|
strcpy(buf + protolen, "REMOTEPORT");
|
||||||
p = getenv(buf);
|
p = getenv(buf);
|
||||||
strncpy(remote_port, p, sizeof remote_port);
|
if (p) {
|
||||||
|
remote_port = strdup(p);
|
||||||
|
}
|
||||||
|
|
||||||
strcpy(buf + protolen, "REMOTEINFO");
|
strcpy(buf + protolen, "REMOTEINFO");
|
||||||
p = getenv(buf);
|
p = getenv(buf);
|
||||||
strncpy(remote_ident, p, sizeof remote_ident);
|
if (p) {
|
||||||
|
remote_ident = strdup(p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -599,6 +605,7 @@ handle_request()
|
||||||
keepalive = 0;
|
keepalive = 0;
|
||||||
}
|
}
|
||||||
if (docgi) {
|
if (docgi) {
|
||||||
|
p[8] = 0;
|
||||||
env("SERVER_PROTOCOL", p);
|
env("SERVER_PROTOCOL", p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue