add support for responses that are not keepalive, not chunked and don't have any content-length header
This commit is contained in:
parent
9df53d5efc
commit
bdfdd127c1
1
TODO
1
TODO
@ -1,4 +1,3 @@
|
|||||||
- handle responses without content-length but connection: close
|
|
||||||
- timing statistics
|
- timing statistics
|
||||||
- generally better statistics
|
- generally better statistics
|
||||||
- ssl support
|
- ssl support
|
||||||
|
11
src/client.c
11
src/client.c
@ -259,8 +259,15 @@ void client_state_machine(Client *client) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* disconnect */
|
/* disconnect */
|
||||||
client->state = CLIENT_ERROR;
|
if (client->parser_state == PARSER_BODY && !client->keepalive && client->status_200
|
||||||
break;
|
&& !client->chunked && client->content_length == -1) {
|
||||||
|
client->success = 1;
|
||||||
|
client->state = CLIENT_END;
|
||||||
|
} else {
|
||||||
|
client->state = CLIENT_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
goto start;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user