I am creating a Http request parser. I am getting data in chunks (byte array) and parsing it simultaneously. I want to know the condition of detecting end of http request. The request may or may not contain message body.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Three different ways:
content-length header (number of bytes following the headers)
chunked encoding (content length unknown at start of request, chunked encoding will indicate when the end is reached)
connection closed by server (http “0.9”)