WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
22488
Make DRT smarter about charset encoding when post-processing webarchive content
https://bugs.webkit.org/show_bug.cgi?id=22488
Summary
Make DRT smarter about charset encoding when post-processing webarchive content
David Kilzer (:ddkilzer)
Reported
2008-11-25 10:48:45 PST
* SUMMARY When attempting to create a layout test for
Bug 22466
, I tried moving fast/encoding/preload-encoding.html to an http test. After setting the charset encoding for the "gb2312" files using a .htaccess file, I found that DRT would crash in convertWebResourceDataToString() because dataAsString was nil using the hard-coded UTF-8 encoding: NSString *dataAsString = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease]; [resource setObject:dataAsString forKey:@"WebResourceData"]; * THE FIX The better way to do this is to: 1. Attempt to convert the IANA charset into an NSStringEncoding value. 2. Check that dataAsString is non-nil before replacing it in the dictionary. Instead of crashing, the worst that will happen is that the string data won't be decoded in the webarchive test output.
Attachments
Patch v1
(3.14 KB, patch)
2008-11-25 10:57 PST
,
David Kilzer (:ddkilzer)
beidson
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
David Kilzer (:ddkilzer)
Comment 1
2008-11-25 10:57:47 PST
Created
attachment 25488
[details]
Patch v1 Suggested fix. No layout test since this is a DRT fix.
David Kilzer (:ddkilzer)
Comment 2
2008-11-26 11:38:39 PST
$ git svn dcommit Committing to
http://svn.webkit.org/repository/webkit/trunk
... M WebKitTools/ChangeLog M WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm Committed
r38786
http://trac.webkit.org/changeset/38786
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