<?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>19974</bug_id>
          
          <creation_ts>2012-11-15 23:13:20 +0000</creation_ts>
          <short_desc>The link checker will use a proxy and it will handle https but it does not do both</short_desc>
          <delta_ts>2012-11-17 07:46:41 +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>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mark Pohl">mark.g.pohl</reporter>
          <assigned_to name="Ville Skyttä">ville.skytta</assigned_to>
          <cc>mark.g.pohl</cc>
          
          <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>78375</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Pohl">mark.g.pohl</who>
    <bug_when>2012-11-15 23:13:20 +0000</bug_when>
    <thetext>The link checker will use a proxy just fine with http but if you use a proxy with https it will not send the https through the proxy.  It will time out.  There is a simple fix for this.  There is a simple fix.  Here is the code to replace the current &quot;new&quot; constructor.  The comment and new code start at line 29 in the method

sub new
{
    my $proto = shift;
    my $class = ref($proto) || $proto;
    my ($name, $from, $rules) = @_;

    # For security/privacy reasons, if $from was not given, do not send it.
    # Cheat by defining something for the constructor, and resetting it later.
    my $from_ok = $from;
    $from ||= &apos;www-validator@w3.org&apos;;

    my $self;
    if (USE_ROBOT_UA) {
        $self = $class-&gt;SUPER::new($name, $from, $rules);
    }
    else {
        my %cnf;
        @cnf{qw(agent from)} = ($name, $from);
        $self = LWP::UserAgent-&gt;new(%cnf);
        $self = bless $self, $class;
    }

    $self-&gt;from(undef) unless $from_ok;

    $self-&gt;env_proxy();
    
     #Added this to set the proxy for https as well as http
    #This is not included with the standard distribution.
    #The standard distribution will work with a proxy and will work with https but it 
    #does not work with both a proxy and https at the same time.
    $self-&gt;{proxy} = { https =&gt; $ua-&gt;{proxy}-&gt;{http},
                       http =&gt; $ua-&gt;{proxy}-&gt;{http}
                  };
    

    $self-&gt;allow_private_ips(1);

    $self-&gt;protocols_forbidden([qw(mailto javascript)]);

    return $self;
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78435</commentid>
    <comment_count>1</comment_count>
    <who name="Ville Skyttä">ville.skytta</who>
    <bug_when>2012-11-17 07:46:41 +0000</bug_when>
    <thetext>If you want to send https through a proxy, set the https_proxy environment variable.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>