In my HTTP Server I have to read in the HTTP request (pretty much just like any other string) using the recv() function, which requires me to specify the maximum size of the buffer. I am however, for obvious reasons, wary of setting a size limit. That, is the essence of my problem.

I thought about it most of yesterday, and realized that I don't have to read in the entire request in one call to recv() - I can specify a small buffer, read in the data, process that, then read in some more, etc... That gives me a bit more freedom, but at some point along the road I'm going to have to store the whole message, regardless of size.

Can anyone think of a solution? Open-ended arrays would be perfect. Although I do have to specify the buffer size, I can just read in the message in parts. Unfortunately, I don't think you have those in C. So any ideas would be greatly appreciated.