Summary: | [Qt] MIME handling in qtwebkit network layer case-sensitivity | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Richard Moore <rich> | ||||||
Component: | Page Loading | Assignee: | QtWebKit Unassigned <webkit-qt-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | abarth, commit-queue, eric, hausmann, jesus, kent.hansen, laszlo.gombos, luiz, markus, robert, tonikitoo, webkit.review.bot | ||||||
Priority: | P2 | Keywords: | Qt, QtTriaged | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
URL: | http://www.buienradar.nl/images.aspx?jaar=-3&bliksem=0&voor=&soort=verwachting1x1 | ||||||||
Attachments: |
|
Richard, your patch needs a ChangeLog and a testcase/unit-test, and the patch should probably be marked for review :) Yeah, the difficulty here is that in order to avoid the test case being more complex than the issue itself we need a server. I was hoping that the server used by the QNAM performance tests would be available for testing qtwebkit stuff but that never happened. This leaves me with the webkit layout test server which i'm told supports php so should be doable. I don't have that setup right now, so this is waiting until I or someone else gets it setup and can write the test. One way of testing it is through a synthetic QNetworkAccessManager instance, like it's done in some of the unit tests, returning a fake http response. Check out tst_qnetworkreply the MiniHttpServer. You don't need a custom QNAM. Created attachment 61258 [details]
Patch
Comment on attachment 61258 [details]
Patch
Excellent, thanks Robert!
r=me. I hope it'll work with the other ports :)
Comment on attachment 61258 [details] Patch Clearing flags on attachment: 61258 Committed r63229: <http://trac.webkit.org/changeset/63229> All reviewed patches have been landed. Closing bug. http://trac.webkit.org/changeset/63229 might have broken GTK Linux 32-bit Release The following changes are on the blame list: http://trac.webkit.org/changeset/63228 http://trac.webkit.org/changeset/63229 |
Created attachment 38432 [details] Patch to fix the bug The code in webkit assumes MIME types will be lower case, but QNetworkAccessManager returns the mime type exactly as it is sent by the remote server. The RFC says mime types are case-insensitive, so in the case of the URL above which sends image/GIF things should work just fine. Unfortunately that is not the case, qtwebkit believes this mime type to be unsupported wheras image/gif is fine. The fix is simply to lowercase the mimetype as it is passed from QNAM to webkit.