<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>6827</bug_id>
          
          <creation_ts>2009-04-16 14:01:08 +0000</creation_ts>
          <short_desc>Resource retrieval: the same URI may be retrieved more than once</short_desc>
          <delta_ts>2009-04-30 15:49:37 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>mobileOK Basic checker</product>
          <component>Java Library</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="fd">fd</reporter>
          <assigned_to name="Abel Rionda">abel.rionda</assigned_to>
          
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>24772</commentid>
    <comment_count>0</comment_count>
    <who name="fd">fd</who>
    <bug_when>2009-04-16 14:01:08 +0000</bug_when>
    <thetext>Description
-----
The same URI may appear more than once in the list of resources to retrieve, because they may appear in different contexts (typically image and object).

Although resource extractors try to re-use retrieval material as much as possible, two resources with the same URI may still have to be created with no retrieval information. The resources would both be retrieved, meaning that there will be two requests to the same URI.


TODO
-----
To ensure that URIs are retrieved only once, we may:
1. check that there exists retrieval information right before the retrieval process starts, but that would still leave open the possibility that the same URI are retrieved at once
2. introduce some kind of dependency between resources to postpone retrieval of a resource while a resource with the same URI is being retrieved and then re-use the retrieval material.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24973</commentid>
    <comment_count>1</comment_count>
    <who name="fd">fd</who>
    <bug_when>2009-04-30 15:49:37 +0000</bug_when>
    <thetext>The Preprocessor now maintains a hashtable of the URIs (fragment section excepted) to retrieve associated with a reference resource. Resources are only processed when they are the reference resource or when the reference resource associated with their URI has been retrieved.

The Preprocessor.processResource method uses the retrieval information of the reference resource when available, and call Resource.retrieve if not.

This was previously being done by extractors, but did not quite fit there anyway so I removed this bit from the extractors implementations.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>