This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6826 - Resource retrieval: the same URI may appear more than once
Summary: Resource retrieval: the same URI may appear more than once
Status: RESOLVED FIXED
Alias: None
Product: mobileOK Basic checker
Classification: Unclassified
Component: Java Library (show other bugs)
Version: unspecified
Hardware: Other All
: P2 enhancement
Target Milestone: ---
Assignee: Abel Rionda
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-16 13:48 UTC by fd
Modified: 2009-04-30 15:39 UTC (History)
0 users

See Also:


Attachments

Description fd 2009-04-16 13:48:58 UTC
Although resource extractors should not extract resources that have already been extracted, they may run concurrently and as such may not know that the same resource is currently being extracted by some other extractor.

Make sure that Preprocessor.addResourcesToProcess does not insert resources that are already in the list. Resources should be identified by their URI, their depth and their context, i.e. it is perfectly normal for the same URI to appear in different contexts (e.g. image and object).
Comment 1 fd 2009-04-30 15:39:26 UTC
Preprocessor.addResourcesToProcess now makes sure that a given URI (fragments not taken into account) at a given depth and at a given context appears only once...

... except that inline/embedded styles are fragments of a given Resource and de facto share the same URI, the same depth, and the same context, sigh. The way the case is handled currently is that the function accepts duplicates when the resource has already been retrieved. Since inline/embedded styles are created from a fragment of a retrieved resource, they are de facto created as "already retrieved" and thus are inserted without any problem.

Still, it would be better to have easy-to-use identifiers to distinguish between styles, and thus base the algorithm on something more tangible than a difference between retrieved/not-retrieved.