diff --git a/sinqhttpopt.c b/sinqhttpopt.c index ac1814a..4637de1 100644 --- a/sinqhttpopt.c +++ b/sinqhttpopt.c @@ -371,7 +371,11 @@ static int processHeader(Ascon *a) } DynStringCapacity(a->rdBuffer,pHttp->bytesExpected); - return 1; + if(pHttp->bytesExpected < 0){ + return 0; + } else { + return 1; + } } /*---------------------------------------------------------------------*/ static int HttpHandler(Ascon * a)