2006-11-14 Darin Adler <darin@apple.com>
[WebKit-https.git] / WebCore / platform / network / cf / ResourceRequestCFNet.cpp
index 60d4f90b8fc8eaa7d725fd16a8bfde687c6fc9eb..08eeb926a78ee9c65b52366112da8400ecb0237b 100644 (file)
@@ -59,11 +59,11 @@ namespace WebCore {
        
 
         if (CFDataRef bodyData = CFURLRequestCopyHTTPRequestBody(cfRequest)) {
-            request.setHTTPBody(FormData(CFDataGetBytePtr(bodyData), CFDataGetLength(bodyData)));
+            request.setHTTPBody(new FormData(CFDataGetBytePtr(bodyData), CFDataGetLength(bodyData)));
             CFRelease(bodyData);
         } else if (CFReadStreamRef bodyStream = CFURLRequestCopyHTTPRequestBodyStream(cfRequest)) {
-            if (const FormData* formData = httpBodyFromStream(bodyStream))
-                request.setHTTPBody(*formData);
+            if (FormData* formData = httpBodyFromStream(bodyStream))
+                request.setHTTPBody(formData);
             CFRelease(bodyStream);
         }
         // FIXME: what to do about arbitrary body streams?