Commit 5f25e696 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

When the completion function returns empty, reset the rxbuffer in

the central code, rather than the completion function.
parent a7c85443
......@@ -269,7 +269,10 @@ SES_RxStuff(struct http_conn *htc, htc_complete_f *func,
/* Working on it */
if (t1 != NULL && isnan(*t1))
*t1 = now;
} else if (hs != HTC_S_EMPTY)
} else if (hs == HTC_S_EMPTY) {
htc->rxbuf_e = htc->rxbuf_b;
*htc->rxbuf_e = '\0';
} else
WRONG("htc_status_e");
tmo = tn - now;
......
......@@ -75,12 +75,9 @@ HTTP1_Complete(struct http_conn *htc)
/* Skip any leading white space */
for (p = htc->rxbuf_b ; vct_islws(*p); p++)
continue;
if (p == htc->rxbuf_e) {
/* All white space */
htc->rxbuf_e = htc->rxbuf_b;
*htc->rxbuf_e = '\0';
if (p == htc->rxbuf_e)
return (HTC_S_EMPTY);
}
/*
* Here we just look for NL[CR]NL to see that reception
* is completed. More stringent validation happens later.
......
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