add support for responses that are not keepalive, not chunked and don't have any content-length header

This commit is contained in:
Thomas Porzelt 2009-10-04 17:45:19 +02:00
vecāks 9df53d5efc
revīzija bdfdd127c1
2 mainīti faili ar 9 papildinājumiem un 3 dzēšanām

1
TODO
Parādīt failu

@ -1,4 +1,3 @@
- handle responses without content-length but connection: close
- timing statistics
- generally better statistics
- ssl support

Parādīt failu

@ -259,8 +259,15 @@ void client_state_machine(Client *client) {
}
} else {
/* disconnect */
client->state = CLIENT_ERROR;
break;
if (client->parser_state == PARSER_BODY && !client->keepalive && client->status_200
&& !client->chunked && client->content_length == -1) {
client->success = 1;
client->state = CLIENT_END;
} else {
client->state = CLIENT_ERROR;
}
goto start;
}
}