| 316 |
316 |
| 317 cxBufferFree(out); |
317 cxBufferFree(out); |
| 318 } |
318 } |
| 319 } |
319 } |
| 320 |
320 |
| |
321 CX_TEST(test_http_client_broken_response) { |
| |
322 CX_TEST_DO { |
| |
323 cxstring response = cx_str( |
| |
324 "broken response\r\n" |
| |
325 "Content-length: 5\r\n" |
| |
326 "\r\n" |
| |
327 "Hello World!\n"); |
| |
328 CxBuffer *out = cxBufferCreate(NULL, NULL, 256, CX_BUFFER_AUTO_EXTEND|CX_BUFFER_FREE_CONTENTS); |
| |
329 |
| |
330 CX_TEST_CALL_SUBROUTINE(test_httpclient, cx_str(NULL), FALSE, &response, 1, out); |
| |
331 CX_TEST_ASSERT(out->size == 0); |
| |
332 cxBufferFree(out); |
| |
333 } |
| |
334 } |