Bug 55767
Summary: | [Qt] Two http auth tests fail with Qt 4.7.2 | ||
---|---|---|---|
Product: | WebKit | Reporter: | Csaba Osztrogonác <ossy> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Critical | CC: | benjamin, joel.parks, joseph.wild, jprvita, markus, ossy, peter.hartmann, robert |
Priority: | P1 | Keywords: | Qt, QtTriaged |
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All | ||
Bug Depends on: | |||
Bug Blocks: | 62929 |
Csaba Osztrogonác
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
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Csaba Osztrogonác
I added them to the Skipped list to make buildbot happy: http://trac.webkit.org/changeset/80343
Joe Wild
I'll take a look at this one.
Joe Wild
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.
Joe Wild
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 &resend)
{
Joe Wild
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't know why this gets stuck here, but will dig deeper. Maybe a missing signal.
Joe Wild
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
Benjamin Poulain
(In reply to comment #6)
> 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
Thanks for investigating.
I add Markus and Peter in CC. Hopefully they have an idea of what have changed.
Joel Parks
requested priority upgrade and ETA on http://bugreports.qt.nokia.com/browse/QTBUG-18411
João Paulo Rechi Vita
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
Csaba Osztrogonác
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.