<?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>12720</bug_id>
          
          <creation_ts>2011-05-22 22:04:47 +0000</creation_ts>
          <short_desc>Link resolution ignores &lt;base href=&quot;&quot; /&gt; for relative links</short_desc>
          <delta_ts>2011-05-23 19:51:45 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>LinkChecker</product>
          <component>checklink</component>
          <version>4.8</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</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>normal</bug_severity>
          <target_milestone>4.81</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Bowen">mbowen</reporter>
          <assigned_to name="Ville Skyttä">ville.skytta</assigned_to>
          
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>48681</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Bowen">mbowen</who>
    <bug_when>2011-05-22 22:04:47 +0000</bug_when>
    <thetext>When resolving relative links such as

 &lt;img src=&quot;img/vccoursepg.gif&quot; /&gt;

the link checker appears to use the document being checked as the base from which to reconstruct the complete URL, instead of the base specified in the &lt;head&gt; of the document using the &lt;base href=&quot;&quot; /&gt; element (in those cases when the latter is present). This causes the link checker to create non-existent URLs, about which it then proceeds to complain.

Example URL of document with this problem:
  http://academic.venturacollege.edu/mbowen/courses/2011haru/grading_status.shtml

Base specification coded within this page:
  &lt;head&gt;&lt;base href=&quot;http://academic.venturacollege.edu/mbowen/index.shtml&quot; /&gt;&lt;/head&gt;
 
Example of a link from this page that works in browsers but is flagged by Linkchecker (I will call this the &quot;tail&quot;):
  &lt;img src=&quot;img/vccoursepg.gif&quot; /&gt;

URL which Linkchecker *should* be constructing to test (base directory + tail), and which my browser (Firefox 3.x, 4.x) also successfully constructs:
  http://academic.venturacollege.edu/mbowen/img/vccoursepg.gif

Nonexistent URL which Linkchecker actually constructs to test (directory of source page + tail):
  http://academic.venturacollege.edu/mbowen/courses/2011haru/img/vccoursepg.gif</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48699</commentid>
    <comment_count>1</comment_count>
    <who name="Ville Skyttä">ville.skytta</who>
    <bug_when>2011-05-23 16:20:13 +0000</bug_when>
    <thetext>You are right, this appears to be a regression introduced in link checker version 4.7 and still present in 4.8 - it works in version 4.6 in my local tests.  Thank you for the report, will look into it ASAP.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48703</commentid>
    <comment_count>2</comment_count>
    <who name="Ville Skyttä">ville.skytta</who>
    <bug_when>2011-05-23 19:51:45 +0000</bug_when>
    <thetext>Should be fixed now in the link checker development instance running at http://qa-dev.w3.org/wlc/checklink</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>