Added CGI session key in HTTP response header
* Session key is returned in first HTTP response if CGI mode is used. Header filed is named 'X-ShellInABox-Session'. This can be used by some special applications that need unique token.
This commit is contained in:
parent
8d3c5cdc3d
commit
b58542eb99
1 changed files with 2 additions and 1 deletions
|
@ -1372,8 +1372,9 @@ int main(int argc, char * const argv[]) {
|
||||||
check(port = serverGetListeningPort(server));
|
check(port = serverGetListeningPort(server));
|
||||||
printf("X-ShellInABox-Port: %d\r\n"
|
printf("X-ShellInABox-Port: %d\r\n"
|
||||||
"X-ShellInABox-Pid: %d\r\n"
|
"X-ShellInABox-Pid: %d\r\n"
|
||||||
|
"X-ShellInABox-Session: %s\r\n"
|
||||||
"Content-type: text/html; charset=utf-8\r\n\r\n",
|
"Content-type: text/html; charset=utf-8\r\n\r\n",
|
||||||
port, getpid());
|
port, getpid(), cgiSessionKey);
|
||||||
UNUSED(cgiRootSize);
|
UNUSED(cgiRootSize);
|
||||||
printfUnchecked(cgiRootStart, port, cgiSessionKey);
|
printfUnchecked(cgiRootStart, port, cgiSessionKey);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
Loading…
Reference in a new issue