Re: CFNetwork?
Re: CFNetwork?
- Subject: Re: CFNetwork?
- From: "Jeff Galyan" <email@hidden>
- Date: Thu, 27 Dec 2001 11:45:51 -0700
Looking through the CFNetwork.pdf, it looks like you want to use
CFHTTPMessageCopyHeaderFieldValue() or CFHTTPMessageCopyAllHeaderFields()
once the incoming HTTP message is deserialized completely.
--Jeff
On 12/27/01 12:55 AM, "Bila Kiss" <email@hidden> wrote:
>
Has anybody been able to get the CFNetwork stuff to work? No matter what I
>
put in my request header, CFHTTPMessageIsHeaderComplete() keeps returning
>
false.
>
>
A sample HTTP request that doesn't work for me is:
>
>
GET / HTTP/1.1\r\n
>
Accept: text/html\r\n
>
User-Agent: Mozilla/4.0\r\n
>
Host: www.apple.com\r\n
>
Connection: close\r\n
>
\r\n
>
>
(FWIW, it serializes correctly using CFHTTPMessageCopySerializedMessage().)
>
>
If I then try to stream the request out as demonstrated in the
>
CFNetwork.pdf, CFReadStreamForHTTPRequest() seems to return a valid stream
>
and CFReadStreamOpen() returns true but
>
CFReadStreamCopyProperty(myReadStream, kCFStreamPropertyHTTPResponseHeader)
>
returns NULL.
>
>
Any pointers would be much appreciated.
>
>
Cheers,
>
>
Bila
References: | |
| >CFNetwork? (From: Béla Kiss <email@hidden>) |