WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
25979
REGRESSION: WML support for local files is broken
https://bugs.webkit.org/show_bug.cgi?id=25979
Summary
REGRESSION: WML support for local files is broken
Nikolas Zimmermann
Reported
2009-05-23 06:11:10 PDT
WML support for local files is broken since content sniffing has been turned off for local files on Mac/CFNetwork. CFNetwork doesn't map the ".wml" file extension to the right WML MIME type. An Apple bug report has been opened to cover this issue. For the meanwhile, introduce a workaround to unbreak WML support on Mac.
Attachments
Initial patch, working around the problem.
(2.01 KB, patch)
2009-05-23 06:14 PDT
,
Nikolas Zimmermann
no flags
Details
Formatted Diff
Diff
Updated patch
(2.17 KB, patch)
2009-05-23 06:19 PDT
,
Nikolas Zimmermann
no flags
Details
Formatted Diff
Diff
Updated patch v2
(2.18 KB, patch)
2009-05-23 06:22 PDT
,
Nikolas Zimmermann
darin
: review-
Details
Formatted Diff
Diff
Updated patch v3
(2.12 KB, patch)
2009-05-30 05:52 PDT
,
Nikolas Zimmermann
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Nikolas Zimmermann
Comment 1
2009-05-23 06:14:43 PDT
Created
attachment 30616
[details]
Initial patch, working around the problem.
Nikolas Zimmermann
Comment 2
2009-05-23 06:19:58 PDT
Created
attachment 30617
[details]
Updated patch Oops, uploaded the wrong patch, missing an include. Adding Brady as reviewer, as we discussed this in private before.
Nikolas Zimmermann
Comment 3
2009-05-23 06:22:11 PDT
Created
attachment 30618
[details]
Updated patch v2 "StdLibExtras.h" -> <wtf/StdLibExtras.h> to preserve Qt build. It's also more correct this way. Sorry for the noise :-)
Eric Seidel (no email)
Comment 4
2009-05-23 07:24:04 PDT
Can't we add the MIME type mapping somewhere in WebCore/WebKit instead of turning on sniffing for .wml fies?
Nikolas Zimmermann
Comment 5
2009-05-23 07:44:26 PDT
(In reply to
comment #4
)
> Can't we add the MIME type mapping somewhere in WebCore/WebKit instead of > turning on sniffing for .wml fies?
Hm I'm unsure about that. Sounds fine in general. I'd love to hear Bradys opinion on that.
Darin Adler
Comment 6
2009-05-23 12:24:24 PDT
Comment on
attachment 30618
[details]
Updated patch v2 This is the wrong place for this workaround. The correct workaround would be to do extension-based MIME type mapping, not to turn on MIME type sniffing. This code needs to go in a place that's determining MIME types, not a place that's deciding whether to do content sniffing.
Brady Eidson
Comment 7
2009-05-23 18:10:28 PDT
Eric and Darin are right - if we need to work around this, it needs to be based on extension -> MIME Type mapping. The one catch-all place to do this is in the didReceiveResponse method closest to the platform layer. We've done things like this recently in ResourceHandleMac.mm, I believe.
Nikolas Zimmermann
Comment 8
2009-05-24 12:44:41 PDT
(In reply to
comment #7
)
> Eric and Darin are right - if we need to work around this, it needs to be based > on extension -> MIME Type mapping. The one catch-all place to do this is in > the didReceiveResponse method closest to the platform layer. We've done things > like this recently in ResourceHandleMac.mm, I believe.
Okay, I'm toying with this for some hours now until I found out didReceiveResponse is the "right spot" to do these hacks :-) But I still don't have any success. I added "[r _setMIMEType:@"text/vnd.wap.wml"];" as hack, just below the "m_handle->client()->didReceiveResponse(...)" call. That makes WebKit open the file and shows the file content, rendered as plain text. But I don't get any WML rendering. But I'm probably just on the wrong track, can you give me a hint? Thanks in advance, Niko
Nikolas Zimmermann
Comment 9
2009-05-30 05:52:14 PDT
Created
attachment 30803
[details]
Updated patch v3 Found another workaround, that fixes the problem without enabling content sniffing. Hopefully it's fine this time.
Darin Adler
Comment 10
2009-05-30 14:38:32 PDT
Comment on
attachment 30803
[details]
Updated patch v3 Looks OK. r=me
Nikolas Zimmermann
Comment 11
2009-05-30 19:33:18 PDT
Landed in
r44294
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug