diff options
Diffstat (limited to 'src/ctl.c')
-rw-r--r-- | src/ctl.c | 22 |
1 files changed, 7 insertions, 15 deletions
@@ -655,22 +655,14 @@ ctlio_finalize_reply (struct ctlio *io) char const *val; struct ctlbuf tmpbuf; - 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? } if (io->state == CTL_END_STATE || io->state == CTL_ACTION_STATE) @@ -1184,7 +1176,7 @@ ctl_open () if (listen (fd, 8)) { logmsg (LOG_CRIT, "can't listen on control socket %s: %s", - strerror (errno)); + control.url->string, strerror (errno)); exit (EX_UNAVAILABLE); } |