| 443 | } |
| 444 | |
| 445 | static int HttpClient_BeginBody(struct HttpRequest* req, struct HttpClientState* state) { |
| 446 | if (!HttpClient_HasBody(req)) |
| 447 | return HTTP_RESPONSE_STATE_DONE; |
| 448 | |
| 449 | if (state->chunked) |
| 450 | return HTTP_RESPONSE_STATE_CHUNK_HEADER; |
| 451 | if (req->contentLength) |
| 452 | return HTTP_RESPONSE_STATE_DATA; |
| 453 | |
| 454 | /* Zero length response */ |
| 455 | return HTTP_RESPONSE_STATE_DONE; |
| 456 | } |
| 457 | |
| 458 | /* RFC 7230, section 4.1 - Chunked Transfer Coding */ |
| 459 | static int HttpClient_GetChunkLength(const cc_string* line) { |
no test coverage detected