| 1868 | } |
| 1869 | |
| 1870 | int |
| 1871 | message_complete_cb (http_parser *p) |
| 1872 | { |
| 1873 | assert(p == parser); |
| 1874 | if (messages[num_messages].should_keep_alive != http_should_keep_alive(parser)) |
| 1875 | { |
| 1876 | fprintf(stderr, "\n\n *** Error http_should_keep_alive() should have same " |
| 1877 | "value in both on_message_complete and on_headers_complete " |
| 1878 | "but it doesn't! ***\n\n"); |
| 1879 | assert(0); |
| 1880 | abort(); |
| 1881 | } |
| 1882 | |
| 1883 | if (messages[num_messages].body_size && |
| 1884 | http_body_is_final(p) && |
| 1885 | !messages[num_messages].body_is_final) |
| 1886 | { |
| 1887 | fprintf(stderr, "\n\n *** Error http_body_is_final() should return 1 " |
| 1888 | "on last on_body callback call " |
| 1889 | "but it doesn't! ***\n\n"); |
| 1890 | assert(0); |
| 1891 | abort(); |
| 1892 | } |
| 1893 | |
| 1894 | messages[num_messages].message_complete_cb_called = TRUE; |
| 1895 | |
| 1896 | messages[num_messages].message_complete_on_eof = currently_parsing_eof; |
| 1897 | |
| 1898 | num_messages++; |
| 1899 | return 0; |
| 1900 | } |
| 1901 | |
| 1902 | int |
| 1903 | response_status_cb (http_parser *p, const char *buf, size_t len) |
no test coverage detected