bugGNUstep - Bugs: bug #8901, Always the same data with [NSURL...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #8901: Always the same data with [NSURL loadResourceDataNotifyingClient:usingCache:NO]

Submitted by:  None
Submitted on:  Wed 12 May 2004 12:31:54 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 12 May 2004 05:23:07 PM UTC, comment #1:

Thanks for the bug report ... I believe I have fixed the problem in CVS.
The fix I used was to modify NSURL.m to ask for a handle which uses the cache irrespective of the flag supplied to -loadResourceDataNotifyingClient:usingCache:, also to try to return cached data if the flag is YES

Richard Frith-Macdonald <CaS>
Project Member
Wed 12 May 2004 12:31:54 PM UTC, original submission:

I always get the same data, when doing:

- (void)fetch
{
[anURL loadResourceDataNotifyingClient:self usingCache:NO];
}

- (void)URLResourceDidFinishLoading:(NSURL *)anURL
{
NSLog([[anURL resourceDataUsingCache:YES] asciiStringValue]]);
}

I mean, as I understood the documentation, when calling -loadResourceDataNotifyingClient:usingCache:NO, with NO as the cache flag, it should load the data in the background and put it into its cache. So that when -URLResourceDidFinishLoading: is called, one can retrieve, what has been loaded by calling -resourceDataUsingCache:YES. (How could one retrieve, what has been loaded otherwise?)
But I always get the same data and I think, I know why: In GSHTTPURLHandle.m:283, the URL-handle is not put into the cache, because 'usingCache' is NO. But using the cache and filling the cache is not the same, but seems to me as if treated the same way here.
I have removed this condition and it works at my place.

Anonymous

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Thu 13 May 2004 09:06:17 AM UTCCaSOpen/ClosedOpen=>Closed
Wed 12 May 2004 05:23:07 PM UTCCaSStatusNone=>Fixed

Back to the top


Powered by Savane 3.1-cleanup1