X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=test%2Ftest_comstack.c;h=0e5233d820210b5b3981fa73aa3eb2c8f1906826;hp=aa816dfc02d8635d9cf2d4ab9001cb08eacb3b0e;hb=6ee0d7c0404834a0a59547c3bd7e2686f838ce37;hpb=0c46d2e66bdeea1600e700124a81a5d0a65d349e diff --git a/test/test_comstack.c b/test/test_comstack.c index aa816df..0e5233d 100644 --- a/test/test_comstack.c +++ b/test/test_comstack.c @@ -173,6 +173,20 @@ static void tst_http_response(void) YAZ_CHECK_EQ(cs_complete_auto(http_buf, 24), 0); } { + /* no content, no headers */ + const char *http_buf = + /*123456789012345678 */ + "HTTP/1.1 204 OK\r\n" + "\r\n" + "HTTP/1.1 200 OK\r\n"; + + YAZ_CHECK_EQ(cs_complete_auto(http_buf, 1), 0); + YAZ_CHECK_EQ(cs_complete_auto(http_buf, 2), 0); + YAZ_CHECK_EQ(cs_complete_auto(http_buf, 18), 0); + YAZ_CHECK_EQ(cs_complete_auto(http_buf, 19), 19); + YAZ_CHECK_EQ(cs_complete_auto(http_buf, 24), 19); + } + { /* response, content */ const char *http_buf = /*123456789012345678 */