Re: kCFStreamErrorHTTPParseFailure?
Re: kCFStreamErrorHTTPParseFailure?
- Subject: Re: kCFStreamErrorHTTPParseFailure?
- From: Jeremy Wyld <email@hidden>
- Date: Mon, 24 Jan 2005 10:00:17 -0800
I thought I had responded to your first email, but looking back, I
guess I hadn't.
The parse failure means exactly that. For whatever reason, the HTTP
engine had issues in parsing the bytes off the wire. Can you post a
tcpdump on the packet(s) involved here?
jeremy
On Jan 24, 2005, at 8:53 AM, Sanford Selznick wrote:
I have some more information on my problem...
1. When I receive the error the data is _always_ in my buffer
correctly, but I get kCFStreamEventErrorOccurred instead of
kCFStreamEventEndEncountered.
2. The error is always
kCFStreamErrorDomainHTTP/kCFStreamErrorHTTPParseFailure.
3a. If I start the fetch at program startup it fails on some computers
9 out of 10 times.
3b. If I start the fetch 5 seconds after program startup it fails on
some computers only 1/5 times (on average).
This is nuts.
Is there truly no one at Apple on this list who can tell me what
triggers a parse failure?
Thank you,
Sanford
At 5:02 PM -0700 1/20/05, Sanford Selznick wrote:
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:
email@hidden
This email sent to email@hidden
_______________________________________________
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
_______________________________________________
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