Re: Strange CFStreamError from CFReadStreamCreateForHTTPRequest
Re: Strange CFStreamError from CFReadStreamCreateForHTTPRequest
- Subject: Re: Strange CFStreamError from CFReadStreamCreateForHTTPRequest
- From: Becky Willrich <email@hidden>
- Date: Fri, 29 Aug 2003 16:41:39 -0700
I'm working on some code to retrieve data from an HTTP server and my
read stream callback is getting kCFStreamEventOpenCompleted, and then
kCFStreamEventErrorOccurred. I then call CFReadStreamGetError and get
a domain of 4, and an error of -1. I've double checked that several
times in the debugger, so I'm sure thats right. What is domain 4? I
can't seem to find anything like that in the headers...
Domain 4 is kCFStreamErrorDomainHTTP; -1 is
kCFStreamErrorHTTPParseFailure. For some reason, CFNetwork cannot
parse the headers returned by the server. Usually, this means the
server is returning a slightly malformed header. Try running tcpdump
and capturing the server's response ('tcpdump -i en0 -s 0 -X host
httpserver.wherever.com'); once you've got the response, see if there's
anything fishy about it.
REW
_______________________________________________
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.