| 1775 | } |
| 1776 | |
| 1777 | int |
| 1778 | header_field_cb (http_parser *p, const char *buf, size_t len) |
| 1779 | { |
| 1780 | assert(p == parser); |
| 1781 | struct message *m = &messages[num_messages]; |
| 1782 | |
| 1783 | if (m->last_header_element != FIELD) |
| 1784 | m->num_headers++; |
| 1785 | |
| 1786 | strlncat(m->headers[m->num_headers-1][0], |
| 1787 | sizeof(m->headers[m->num_headers-1][0]), |
| 1788 | buf, |
| 1789 | len); |
| 1790 | |
| 1791 | m->last_header_element = FIELD; |
| 1792 | |
| 1793 | return 0; |
| 1794 | } |
| 1795 | |
| 1796 | int |
| 1797 | header_value_cb (http_parser *p, const char *buf, size_t len) |
no test coverage detected