Bug 36755 - [Qt] REGRESSION: Loading of external CSS and JS files over network fails in some cases
Summary: [Qt] REGRESSION: Loading of external CSS and JS files over network fails in s...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P1 Normal
Assignee: QtWebKit Unassigned
URL: http://www.nokia.fi
Keywords: Qt
: 37852 (view as bug list)
Depends on:
Blocks: 35784
  Show dependency treegraph
Reported: 2010-03-29 06:51 PDT by Kim Grönholm
Modified: 2010-05-18 02:45 PDT (History)
10 users (show)

See Also:

Patch to enable direct connections only for > Qt 4.6.2 (1.49 KB, patch)
2010-05-06 07:57 PDT, Simon Hausmann
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kim Grönholm 2010-03-29 06:51:18 PDT
Some sites that have both extrenal css and js files fail to load them. Some examples:

The regression is caused by the patch in https://bugs.webkit.org/show_bug.cgi?id=32113

Tested with Qt versions 4.6.2 and 4.7 with both Ubuntu and Windows.
Comment 1 Simon Hausmann 2010-03-29 07:05:20 PDT
Kim, if the Qt::DirectionConnection broke this, do you have any idea what exactly could've caused it?
Comment 2 Kim Grönholm 2010-03-29 07:20:03 PDT
No. I didn't dig in deeper and I'm not very familiar with this part of QtWebKit. We found the patch to blame by bisecting.
Comment 3 Janne Koskinen 2010-03-30 03:24:13 PDT
Tested with Qt 4.6.2 and webkit built from trunk@56711 on Symbian using Anomaly. Both URLs get stuck when loading the page and never finish.
Comment 4 Simon Hausmann 2010-03-30 07:36:43 PDT
A reduction is needed. Holger suggested on IRC:

"a start would be to use the mirror tool, either by mirroring as far as we get. or by using a older qt and get the complete file
then we can use the power of sqlite to see the difference in requests (completed) and reducing it..
other useful hints would be: What kind of request is failing? XMLHttpRequest? sync/async one? is the load deferred?
Comment 5 Simon Hausmann 2010-04-19 18:42:28 PDT
Darn, I can't reproduce this with trunk and Qt 4.7 anymore ;(

I mirrored it with Holger's tool and it loads through the builtin http server, too.

Maybe it is/was a fix in Qt 4.7?
Comment 6 Markus Goetz 2010-04-26 01:18:05 PDT
Can someone who reproduced it before try this also with current 4.6. from git and with 4.7 from git?
Comment 7 Andreas Kling 2010-04-27 04:39:15 PDT
(On current Qt 4.7) Can't reproduce with WebKit trunk or WebKit from Qt 4.7
Comment 8 Kim Grönholm 2010-05-04 11:43:17 PDT
Tested with current Qt 4.6 from git (4.6.3) and current Qt 4.7 from git and both work fine! Then tested again with Qt 4.6.2 and the bug appears.

We could change the version check to:
Comment 9 Markus Goetz 2010-05-05 00:15:38 PDT
That sounds like an OK workaround to me.
Comment 10 Simon Hausmann 2010-05-06 07:53:43 PDT
I bisected Qt 4.6 and indeed commit 232defa5d084386a9cdeb229cefee0a4a09bca85 in Qt fixes the problem:

commit 232defa5d084386a9cdeb229cefee0a4a09bca85
Author: Markus Goetz <Markus.Goetz@nokia.com>
Date:   Thu Feb 11 13:21:57 2010 +0100

    QNAM HTTP: Set channel to IdleState at better place
    The readyRead() from the expand() function called from allDone()
    had a new request triggered for that channel even if it is not really
    finished yet. Move the assignment to IdleState inside
    allDone to avoid this error.
    Reviewed-by: Andreas Kling
    Reviewed-by: Peter Hartmann
Comment 11 Simon Hausmann 2010-05-06 07:57:14 PDT
Created attachment 55238 [details]
Patch to enable direct connections only for > Qt 4.6.2
Comment 12 WebKit Commit Bot 2010-05-06 13:01:48 PDT
Comment on attachment 55238 [details]
Patch to enable direct connections only for > Qt 4.6.2

Clearing flags on attachment: 55238

Committed r58903: <http://trac.webkit.org/changeset/58903>
Comment 13 WebKit Commit Bot 2010-05-06 13:01:56 PDT
All reviewed patches have been landed.  Closing bug.
Comment 14 Simon Hausmann 2010-05-07 00:30:00 PDT
Revision r58903 cherry-picked into qtwebkit-2.0 with commit 102de4f0e2622dd85a2eb33008473013710dd177
Comment 15 Jocelyn Turcotte 2010-05-18 02:45:39 PDT
*** Bug 37852 has been marked as a duplicate of this bug. ***