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

Group
 
 

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

Submitter:  None
Submitted:  Wed 12 May 2004 12:31:54 PM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Bug Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-05-13 CaS Open/ClosedOpen Closed
2004-05-12 CaS StatusNone Fixed

Back to the top

Powered by Savane 3.13-d3ae.
Corresponding source code