commit - 62dd118885b4ad9677bc80d8cca4982acb7a234e7b3e4e14f9d5f7d7dbc582c5
commit + 667b49380765081e326af04aef8c6e374ef0fc2bd3fdcd91b7457dd2dc8f9251
blob - e67eb12e0ddd051f1b0a2a4207edfa27f245ada0e5fa2151a4fee3232ee9f3fd
blob + 400a5dc5471d90a524a185f7be47c51fad453d48d978a0fde261bd53cb1a02c1
--- gotwebd/fcgi.c
+++ gotwebd/fcgi.c
}
break;
case 0:
- if (c->sock->client_status == CLIENT_CONNECT) {
+ if (c->client_status == CLIENT_CONNECT) {
log_warnx("client %u closed connection too early",
c->request_id);
goto fail;
c->resp_fd = pipe[1];
c->resp_event = resp_event;
- c->sock->client_status = CLIENT_REQUEST;
+ c->client_status = CLIENT_REQUEST;
}
void
while (tot > 0) {
nw = writev(c->fd, iov, nitems(iov));
if (nw == 0) {
- c->sock->client_status = CLIENT_DISCONNECT;
+ c->client_status = CLIENT_DISCONNECT;
break;
}
if (nw == -1) {
continue;
}
log_warn("%s: write failure", __func__);
- c->sock->client_status = CLIENT_DISCONNECT;
+ c->client_status = CLIENT_DISCONNECT;
return -1;
}
fcgi_send_response(struct request *c, int type, const void *data,
size_t len)
{
- if (c->sock->client_status == CLIENT_DISCONNECT)
+ if (c->client_status == CLIENT_DISCONNECT)
return -1;
while (len > FCGI_CONTENT_SIZE) {
blob - a28a0fef4f7272649db971d45a70f96c487970ad38428eac6822abdfb5fdba59
blob + 0ae75bbd22f4f81cf117765352fabc1b3f2b42268a32d5a40bc3b78e44f3c566
--- gotwebd/gotwebd.h
+++ gotwebd/gotwebd.h
int https;
uint8_t request_started;
+ int client_status;
};
TAILQ_HEAD(requestlist, request);
struct event evt;
struct event ev;
struct event pause;
-
- int client_status;
};
TAILQ_HEAD(socketlist, socket);
blob - 4050c61438004f7cedd1c6873686a734577d4ca5773b1d3ebf2d8d9cc4601723
blob + 6151ea693c3a58ab19379ea24b433693859a0fdfce84564eaec223798c09c3b3
--- gotwebd/sockets.c
+++ gotwebd/sockets.c
return;
}
- if (c->sock->client_status == CLIENT_REQUEST)
+ if (c->client_status == CLIENT_REQUEST)
fcgi_create_end_record(c);
fcgi_cleanup_request(c);
}
c->buf_pos = 0;
c->buf_len = 0;
c->request_started = 0;
- c->sock->client_status = CLIENT_CONNECT;
+ c->client_status = CLIENT_CONNECT;
c->request_id = get_request_id();
event_set(&c->ev, s, EV_READ, fcgi_request, c);