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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>55767</bug_id>
          
          <creation_ts>2011-03-04 04:33:46 -0800</creation_ts>
          <short_desc>[Qt] Two http auth tests fail with Qt 4.7.2</short_desc>
          <delta_ts>2012-02-21 05:55:10 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</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>Qt, QtTriaged</keywords>
          <priority>P1</priority>
          <bug_severity>Critical</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>62929</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Csaba Osztrogonác">ossy</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>benjamin</cc>
    
    <cc>joel.parks</cc>
    
    <cc>joseph.wild</cc>
    
    <cc>jprvita</cc>
    
    <cc>markus</cc>
    
    <cc>ossy</cc>
    
    <cc>peter.hartmann</cc>
    
    <cc>robert</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>362416</commentid>
    <comment_count>0</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-03-04 04:33:46 -0800</bug_when>
    <thetext>The following tests pass with Qt 4.7.1, but fail with Qt 4.7.2:
http/tests/appcache/auth.html
http/tests/xmlhttprequest/basic-auth.html

pretty diffs:
http://build.webkit.org/results/Qt%20Linux%20Release/r80342%20%2829298%29/http/tests/appcache/auth-pretty-diff.html
http://build.webkit.org/results/Qt%20Linux%20Release/r80342%20%2829298%29/http/tests/xmlhttprequest/basic-auth-pretty-diff.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>362417</commentid>
    <comment_count>1</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-03-04 04:37:50 -0800</bug_when>
    <thetext>I added them to the Skipped list to make buildbot happy: http://trac.webkit.org/changeset/80343</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>370833</commentid>
    <comment_count>2</comment_count>
    <who name="Joe Wild">joseph.wild</who>
    <bug_when>2011-03-21 12:45:06 -0700</bug_when>
    <thetext>I&apos;ll take a look at this one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>371579</commentid>
    <comment_count>3</comment_count>
    <who name="Joe Wild">joseph.wild</who>
    <bug_when>2011-03-22 13:11:15 -0700</bug_when>
    <thetext>It looks like the user and password authentication info is not getting
through in Qt 4.7.2.  They are added to the URL as in

  http://login:pasword@localhost/t/LayoutTests/http/tests/appcache/resources/auth/setup.php

but they are not added to the Authorization HTTP header as

  GET /t/LayoutTests/http/tests/appcache/resources/auth/setup.php HTTP/1.1
  ...
  Authorization: Basic bG9naW46cGFzd29yZA==


This fetch fails with a 401 Unauthorized error.
If I force the Authorization header this fetch succeeds.  Then the next
fetch to iframe.php gets an 401 failure.  I assume that
means that this info needs tqo be saved and send with following requests.

Anyway, I think I need to investigate how this worked in Qt 4.7.1 since
there seem to be several possibilities on how this should be fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>372416</commentid>
    <comment_count>4</comment_count>
    <who name="Joe Wild">joseph.wild</who>
    <bug_when>2011-03-23 14:01:42 -0700</bug_when>
    <thetext>Just wanted to add that I see very different behavior.  In Qt 4.7.1 the first
fetch that requires authentication fails and then another fetch with the
Authorization headers succeeds.  In 4.7.2, the 1st just fails.

I also see changes in the state machine.  This state is not in 4.7.2
case QHttpNetworkConnectionChannel::Wait4AuthState:

I think the next place for me to debug in here.

// handles the authentication for one channel and eventually re-starts the other channels
bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket *socket, QHttpNetworkReply *reply,
                                                                bool isProxy, bool &amp;resend)
{</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>373225</commentid>
    <comment_count>5</comment_count>
    <who name="Joe Wild">joseph.wild</who>
    <bug_when>2011-03-24 17:26:36 -0700</bug_when>
    <thetext>What I am seeing is that the same socket is used for the 2nd request with the Authorization headers.  However the socket stays in the Unconnected state and never makes the transition to Connected.  Therefore this request times out.
I don&apos;t know why this gets stuck here, but will dig deeper.  Maybe a missing signal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>374503</commentid>
    <comment_count>6</comment_count>
    <who name="Joe Wild">joseph.wild</who>
    <bug_when>2011-03-28 08:24:45 -0700</bug_when>
    <thetext>This seems to be a problem in Qt 4.7.2 HTTP/Socket code.  Entered the following error for it.

QTBUG-18411 - Qt 4.7.2 fails to add HTTP Authorization header and refetch after 401 
http://bugreports.qt.nokia.com/browse/QTBUG-18411</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>380692</commentid>
    <comment_count>7</comment_count>
    <who name="Benjamin Poulain">benjamin</who>
    <bug_when>2011-04-06 11:56:17 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; This seems to be a problem in Qt 4.7.2 HTTP/Socket code.  Entered the following error for it.
&gt; 
&gt; QTBUG-18411 - Qt 4.7.2 fails to add HTTP Authorization header and refetch after 401 
&gt; http://bugreports.qt.nokia.com/browse/QTBUG-18411

Thanks for investigating.

I add Markus and Peter in CC. Hopefully they have an idea of what have changed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>428215</commentid>
    <comment_count>8</comment_count>
    <who name="Joel Parks">joel.parks</who>
    <bug_when>2011-06-27 13:15:14 -0700</bug_when>
    <thetext>requested priority upgrade and ETA on http://bugreports.qt.nokia.com/browse/QTBUG-18411</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>526391</commentid>
    <comment_count>9</comment_count>
    <who name="João Paulo Rechi Vita">jprvita</who>
    <bug_when>2011-12-22 11:33:22 -0800</bug_when>
    <thetext>http/tests/appcache/auth.html has been moved to the Qt-4.8 skip list on http://trac.webkit.org/changeset/103504

More info can be found on bug https://bugs.webkit.org/show_bug.cgi?id=74960</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>560828</commentid>
    <comment_count>10</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2012-02-21 05:55:10 -0800</bug_when>
    <thetext>http/tests/appcache/auth.html works with Qt 4.8 and Qt 5.0 too, I unskipped it - http://trac.webkit.org/changeset/108346/trunk/LayoutTests/platform/qt-4.8/Skipped

And http/tests/xmlhttprequest/basic-auth.html fails only on qt-5.0-wk2 because of other reason, so we can close this bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>