aboutsummaryrefslogtreecommitdiff
path: root/src/ctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ctl.c')
-rw-r--r--src/ctl.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/ctl.c b/src/ctl.c
index 4f56923..f7e46d0 100644
--- a/src/ctl.c
+++ b/src/ctl.c
@@ -657,18 +657,10 @@ ctlio_finalize_reply (struct ctlio *io)
- if (io->state & (CTL_INITIAL_STATE|CTL_AUTHENTICATED_STATE))
+ val = http_get_header (io->input.headers, "connection");
+ if (val)
{
- if (io->code / 100 == 2 || io->code == 401)
- {
- val = http_get_header (io->input.headers, "connection");
- if (val)
- {
- if (strcasecmp (val, "keep-alive") == 0)
- /* nothing */;
- else if (strcasecmp (val, "close") == 0)
- io->state = CTL_END_STATE;
- //FIXME: else?
- }
- }
- else
+ if (strcasecmp (val, "keep-alive") == 0)
+ /* nothing */;
+ else if (strcasecmp (val, "close") == 0)
io->state = CTL_END_STATE;
+ //FIXME: else?
}
@@ -1186,3 +1178,3 @@ ctl_open ()
logmsg (LOG_CRIT, "can't listen on control socket %s: %s",
- strerror (errno));
+ control.url->string, strerror (errno));
exit (EX_UNAVAILABLE);

Return to:

Send suggestions and report system problems to the System administrator.