The way it is now, you read N bytes of the body, declare the body reading done and hope for the best. If there's another request queue after it, the data returned by recv will be wrong because you don't know if you have skipped everything or not (despite marking it as done).