| 418 | } |
| 419 | |
| 420 | static int on_headers_complete(http_parser* p) |
| 421 | { |
| 422 | ResponseDecoder* decoder = (ResponseDecoder*) p->data; |
| 423 | |
| 424 | CHECK_NOTNULL(decoder->response); |
| 425 | |
| 426 | // Add final header. |
| 427 | decoder->response->headers[decoder->field] = decoder->value; |
| 428 | decoder->field.clear(); |
| 429 | decoder->value.clear(); |
| 430 | |
| 431 | return http_parsing::SUCCESS; |
| 432 | } |
| 433 | |
| 434 | static int on_body(http_parser* p, const char* data, size_t length) |
| 435 | { |
nothing calls this directly
no outgoing calls
no test coverage detected