MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / message_complete_cb

Function message_complete_cb

libs/qhttpserver/http-parser/test.c:1870–1900  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1868}
1869
1870int
1871message_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
1902int
1903response_status_cb (http_parser *p, const char *buf, size_t len)

Callers 1

Calls 2

http_should_keep_aliveFunction · 0.85
http_body_is_finalFunction · 0.85

Tested by

no test coverage detected