Re: Reading HTTP headers (was Re: cfsockets vs OT)
Re: Reading HTTP headers (was Re: cfsockets vs OT)
- Subject: Re: Reading HTTP headers (was Re: cfsockets vs OT)
- From: Joseph Kim <email@hidden>
- Date: Tue, 6 Jan 2004 01:24:39 -0600
On Jan 6, 2004, at 12:31 AM, Larry Gerndt wrote:
This raises a question I've long had: in HTTP, what is the best way
to read
in the HTTP header? The only way that makes sense to me is to read
one byte
at a time until I see the header terminator, 0x0D0A0D0A, because there
is no
way of knowing how big the header is. Am I missing something?
General technique is to read() big chunks and do your
protocol parsing from the buffer. You generally don't
want to make N system calls to read/write N bytes.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.