Re: Async HTTP stream never gets called on 10.2
Re: Async HTTP stream never gets called on 10.2
- Subject: Re: Async HTTP stream never gets called on 10.2
- From: Miro Jurišić <email@hidden>
- Date: Wed, 16 Feb 2005 15:20:19 -0500
You could try printing out the return value of CFRunLoopGetCurrent()
and make sure it's the same value each time through.
I did, and it is.
You can also try doing a tcpdump to see how much (if any) of the
failing transaction gets through. If the new request isn't even being
transmitted, you probably have some kind of a run loop scheduling
problem - scheduled on the wrong run loop, run loop isn't running or
is running in the wrong mode, etc.
Not even a TCP SYN is sent from me to the server.
Are all the requests going to the same host?
Yes
Are you using persistent connections?
No
Is there a proxy configured?
No
What other properties are set on the streams?
kCFStreamPropertyHTTPProxy, ::SCDynamicStoreCopyProxies(0)
kCFStreamPropertyHTTPShouldAutoredirect, kCFBooleanTrue
and a User-Agent header on the request message
Is there anything unusual about the requests you're transmitting - do
they carry especially large bodies, or do the headers or the URL
contain high-bit characters?
Nothing I can think of. They are all GET URLs less than 200 chars long
with no unusual characters.
One thing that I just realized I should point out is that the last
request is actually being sent twice, because the server requires
authentication. So, I have an HTTP message, I create a async stream for
it, it works fine and produces a 401 response, I call
CFHTTPMessageAddAuthentication, make a new async stream for it, and the
second stream just never gets called back.
One of the requests that I make before the failing one also requires
authentication and works just fine.
I tried changing the order of requests from 1, 2, 3, 3 w/ auth, 4, 4 w/
auth to 1, 2, 4, 4 w/ auth, 3, 3 w/ auth, and then 3 w/ auth which
previously worked started fialing, and 4 w/ auth, which previous was
hosed, started working.
If the user hits the cancel button while I am waiting for the
never-to-be called request (whereupon I close the stream), and then
restarts the request sequence, 1-3 again work fine, and 4 again fails
in the same way, so whatever the problem is, my run loop is not
permanently broken.
meeroh
--
<http://web.meeroh.org/> | KB1FMP
"And when I have understanding of computers, I shall be
the supreme being!" -- Evil, "Time Bandits"
_______________________________________________
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