<?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>6824</bug_id>
          
          <creation_ts>2009-04-16 13:31:29 +0000</creation_ts>
          <short_desc>Redirections: parsing of the Location HTTP header may raise HTTP_RESPONSE-5 incorrectly</short_desc>
          <delta_ts>2009-04-30 11:56:38 +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>minor</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>24768</commentid>
    <comment_count>0</comment_count>
    <who name="fd">fd</who>
    <bug_when>2009-04-16 13:31:29 +0000</bug_when>
    <thetext>HTTP_RESPONSE-5 is a warning that should be raised whenever the Location HTTP header received in a redirect response contains a relative URI.

The check performed in HttpRetrievalElement is a bit too restrictive. Not starting with &quot;http&quot; does not necessarily mean the URI is relative (it could be &quot;ftp://foo&quot;). Besides the scheme part of a URI is case-insensitive, and so HTTP://example.com should be considered as a valid absolute URI that should not trigger the warning!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24841</commentid>
    <comment_count>1</comment_count>
    <who name="Abel Rionda">abel.rionda</who>
    <bug_when>2009-04-20 08:41:03 +0000</bug_when>
    <thetext>Used isAbsolute method from Java.net.URI class.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>24971</commentid>
    <comment_count>2</comment_count>
    <who name="fd">fd</who>
    <bug_when>2009-04-30 11:56:38 +0000</bug_when>
    <thetext>While having a look, I realized that we were not entirely consistent throughout the code on the way URIs were resolved.

Resource.parseUri implements some exception-to-the-rules to handle unsafe characters that are generally accepted by browsers. Since it was being used in a few places, I thought it would be better to be consistent and use it everywhere.

DefaultInputModeTest.validInputMode still uses a call to &quot;new URI&quot;. It doesn&apos;t seem such a good idea to parse the URI with relaxed rules in that case.

Also replaced HTTP_RESPONSE-4 by HTTP_RESPONSE-6 in the case when the URI of the Location HTTP header cannot be parsed. In the absence of a more precise error code, that just sounded less confusing to say: &quot;the URI does not have the http/https scheme&quot; than &quot;there is no Location header&quot; (since there is one).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>