• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: kCFStreamErrorHTTPParseFailure?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: kCFStreamErrorHTTPParseFailure?


  • Subject: Re: kCFStreamErrorHTTPParseFailure?
  • From: Sanford Selznick <email@hidden>
  • Date: Mon, 24 Jan 2005 09:53:47 -0700

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:
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
  • Follow-Ups:
    • Re: kCFStreamErrorHTTPParseFailure?
      • From: "Jamie Wood" <email@hidden>
    • Re: kCFStreamErrorHTTPParseFailure?
      • From: Jeremy Wyld <email@hidden>
References: 
 >kCFStreamErrorHTTPParseFailure? (From: Sanford Selznick <email@hidden>)

  • Prev by Date: Re: system socket library?
  • Next by Date: Re: kCFStreamErrorHTTPParseFailure?
  • Previous by thread: kCFStreamErrorHTTPParseFailure?
  • Next by thread: Re: kCFStreamErrorHTTPParseFailure?
  • Index(es):
    • Date
    • Thread