RESOLVED FIXED 17381
[CURL] Regression: data URL parsing broken after DeprecatedString removal (Acid2)
https://bugs.webkit.org/show_bug.cgi?id=17381
Summary [CURL] Regression: data URL parsing broken after DeprecatedString removal (Ac...
Alp Toker
Reported 2008-02-15 16:45:32 PST
WebCore/platform/network/curl/ResourceHandleManager.cpp uses String to carry binary data, which doesn't work properly. The fix will be something along the lines of: char* ret = 0; + size_t retLen = 0; + if (base64 && !data.isEmpty()) { // Use the GLib Base64 if available, since WebCore's decoder isn't // general-purpose and fails on Acid3 test 97 (whitespace). #ifdef USE_GLIB_BASE64 gsize outLength; guchar* out = g_base64_decode(data.latin1().data(), &outLength); - data = String(reinterpret_cast<char*>(out), outLength); - g_free(out); + //g_free(out); + ret = (char*)out; + retLen = outLength; #else + if (retLen) + client->didReceiveData(handle, ret, retLen, 0);
Attachments
Alp Toker
Comment 1 2008-02-18 15:18:02 PST
Fix landed in r30386. parseDataUrl() remains flaky as ever for character encoded URLs but the acid data url tests pass again with this fix.
Note You need to log in before you can comment on or make changes to this bug.