Commit 4604d93d authored by jehan's avatar jehan
Browse files

avoid chunked body parser to search for new chunk outside of received data

parent 2b01dd69
......@@ -403,7 +403,8 @@ static int acquire_chuncked_body(belle_sip_channel_t *obj){
/*need more data*/
return BELLE_SIP_STOP;
}
}while(1);
}while(st->write_ptr-st->read_ptr>0); /*no need to continue if nothing to read*/
return BELLE_SIP_STOP;
}
static int acquire_body(belle_sip_channel_t *obj, int end_of_stream){
......
......@@ -150,7 +150,7 @@ static void one_https_get(void){
static void https_get_long_body(void){
http_counters_t counters={0};
one_get("https://www.linphone.org/eng/features/",&counters, &counters.response_count);
one_get("https://www.linphone.org/technical-corner/linphone.html",&counters, &counters.response_count);
CU_ASSERT_TRUE(counters.response_count==1);
CU_ASSERT_TRUE(counters.io_error_count==0);
CU_ASSERT_EQUAL(counters.two_hundred,1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment