[Webkit-unassigned] [Bug 13090] curl (linux/gdk) networking improvements

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 18 09:42:16 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=13090


bdash at webkit.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #13653|review?                     |review-
               Flag|                            |




------- Comment #2 from bdash at webkit.org  2007-04-18 09:42 PDT -------
(From update of attachment 13653)
+    if ((CURLE_OK == err) && ((301 == httpCode) || (302 == httpCode)))
+        return totalSize;
+

You have unneeded parenthesis here, and in several other places.


+        CString cstring =  elements[i].m_filename.utf8();

An extra space after the =.

+        // Fill in the file upload field
+        curl_formadd(&post,
+                      &lastItem,
+                      CURLFORM_COPYNAME, "sendfile",
+                      CURLFORM_FILE, d->m_fileName,
+                      CURLFORM_END);
+ 
+        // Fill in the filename field
+        curl_formadd(&post,
+                      &lastItem,
+                      CURLFORM_COPYNAME, "filename",
+                      CURLFORM_COPYCONTENTS, d->m_fileName,
+                      CURLFORM_END);
+ 
+        // Fill in the submit field too, even if this is rarely needed
+        curl_formadd(&post,
+                      &lastItem,
+                      CURLFORM_COPYNAME, "submit",
+                      CURLFORM_COPYCONTENTS, "send",
+                      CURLFORM_END);

This looks to be based on curl example code.  It seems incorrect to be adding a
form field named "submit" for each file that is uploaded.  I think the
indentation style of this code block could be cleaned up a great deal too.


+        if (job == node->job()) {
+            node->setRemoved(true);
+            return true;
+            node = next;
+        }

I think "node = next;" should be outside the braces.


+class ResourceHandleList
+{

Brace should be on same line as class statement.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list