URLAccess problems
URLAccess problems
- Subject: URLAccess problems
- From: Simon Fell <email@hidden>
- Date: Fri, 10 Jan 2003 14:49:55 -0800
I'm noticing that when I make an HTTP request that returns no entity body
(e.g. I get a HTTP 304 status code back), that URLGetCurrentState continues
to return kURLDownloadingState for 30 seconds before returning
kURLCompletedState, it looks like it has some internal timeout waiting for
an entity body that's never going to arrive. here's my code
OSErr err = URLOpen ( urlRef, NULL, 0, NULL, 0, NULL ) ;
if ( noErr == err )
{
bool doneHeaders = false ;
void * buff = NULL ;
Size cb =0 ;
URLState state ;
bool ok = true ;
do
{
URLIdle() ;
err = URLGetBuffer ( urlRef, &buff, &cb ) ;
if ( noErr == err )
{
if ( ! doneHeaders )
doneHeaders = pimpl->doHeaderCallbacks (
urlRef, mgr ) ;
if ( cb > 0 )
ok = mgr.bodyCallback( (BYTE *)buff, cb ) ;
}
if ( cb > 0 )
URLReleaseBuffer ( urlRef, buff ) ;
URLGetCurrentState ( urlRef, &state ) ;
} while ( state != kURLAbortingState &&
state != kURLCompletedState &&
state != kURLErrorOccurredState ) ;
}
I'm seeing this on 10.2.3 and 10.2 (haven't tested any others)
Am I doing something wrong ? or is this a bug in URLAccess ?
Cheers
Simon
_______________________________________________
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.