<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>17381</bug_id>
          
          <creation_ts>2008-02-15 16:45:32 -0800</creation_ts>
          <short_desc>[CURL] Regression: data URL parsing broken after DeprecatedString removal (Acid2)</short_desc>
          <delta_ts>2008-02-18 15:18:02 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Curl, Gtk</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alp Toker">alp</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>70813</commentid>
    <comment_count>0</comment_count>
    <who name="Alp Toker">alp</who>
    <bug_when>2008-02-15 16:45:32 -0800</bug_when>
    <thetext>WebCore/platform/network/curl/ResourceHandleManager.cpp uses String to carry binary data, which doesn&apos;t work properly.

The fix will be something along the lines of:

    char* ret = 0;
+    size_t retLen = 0;
+
     if (base64 &amp;&amp; !data.isEmpty()) {
         // Use the GLib Base64 if available, since WebCore&apos;s decoder isn&apos;t
         // general-purpose and fails on Acid3 test 97 (whitespace).
 #ifdef USE_GLIB_BASE64
         gsize outLength;
         guchar* out = g_base64_decode(data.latin1().data(), &amp;outLength);
-        data = String(reinterpret_cast&lt;char*&gt;(out), outLength);
-        g_free(out);
+        //g_free(out);
+        ret = (char*)out;
+        retLen = outLength;
 #else





+    if (retLen)
+        client-&gt;didReceiveData(handle, ret, retLen, 0);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71088</commentid>
    <comment_count>1</comment_count>
    <who name="Alp Toker">alp</who>
    <bug_when>2008-02-18 15:18:02 -0800</bug_when>
    <thetext>Fix landed in r30386. parseDataUrl() remains flaky as ever for character encoded URLs but the acid data url tests pass again with this fix.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>