kCFStreamErrorHTTPParseFailure?
kCFStreamErrorHTTPParseFailure?
- Subject: kCFStreamErrorHTTPParseFailure?
- From: Sanford Selznick <email@hidden>
- Date: Thu, 20 Jan 2005 17:02:22 -0700
I'm following the CFNetwork example at the URL below to get data from
a server by HTTP GET.
http://developer.apple.com/samplecode/CFNetworkHTTPDownload/listing1.html
I'm running:
Mac OS X 10.3.7.
Asynchronous download using runloops and callbacks.
Mach-O, Carbon.Framework.
I am looking to read the result of a cgi. The CFURL was initialized
with a string of the form:
<http://www.domain.com/cgi_bin/mycgi.pl?v1=a&v2=b&v3=c>.
When I receive kCFStreamEventHasBytesAvailable in the callback I call
::CFReadStreamRead(). I've verified that 100% of my data is read and
copied to my buffer. After this I get the
kCFStreamEventErrorOccurred in the callback. At this point I call
CFReadStreamGetError and get back an error of -1 and a domain of 4.
(I believe this is kCFStreamErrorDomainHTTP and
kCFStreamErrorHTTPParseFailure.)
All my CGI is returning is:
print "Content-type: text/plain\n\nOne Line Of Text";
So this is pretty basic stuff.
The URL loads fine in all browsers and I see my resulting text just fine.
What kinds of problems can trigger kCFStreamErrorHTTPParseFailure?
Thank you,
Sanford
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden