Reputation: 467
I'm trying to implement HTTP/1.1 protocol using Socket in C language. I just want to know if the Body inside a request can contain strings like: "\r\n" i.e a CR LF.
Also, please let me know if there is a maximum limit to the number of characters inside the body.
Upvotes: 2
Views: 1408
Reputation: 596307
Yes, the body can contain CRLFs. No, there is no limit to the length of the body. The body is arbitrary data, as far as HTTP is concerned. RFC 2616 Section 4.4 outlines how to determine the length of the body and how the body is transmitted. The Content-Type
header determines how the body data is interpreted once received.
Upvotes: 5
Reputation: 213338
There are no limits to the size or content of the body in an HTTP request or response.
Upvotes: 6