<?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>18832</bug_id>
          
          <creation_ts>2008-05-01 13:17:38 -0700</creation_ts>
          <short_desc>[curl] file upload does not work</short_desc>
          <delta_ts>2008-10-03 21:24:42 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</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="arno.">a.renevier</reporter>
          <assigned_to name="Marco Barisione">marco.barisione</assigned_to>
          <cc>ahya365</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>marco.barisione</cc>
    
    <cc>mike.emmel</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>79380</commentid>
    <comment_count>0</comment_count>
    <who name="arno.">a.renevier</who>
    <bug_when>2008-05-01 13:17:38 -0700</bug_when>
    <thetext>Hi,
I&apos;m compiled gtk-webkit with curl backend on a debian unstable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79385</commentid>
    <comment_count>1</comment_count>
    <who name="arno.">a.renevier</who>
    <bug_when>2008-05-01 13:32:59 -0700</bug_when>
    <thetext>Hi,
I&apos;m compiled gtk-webkit with curl backend on a debian unstable, and file upload does not work.

In send a negative Content-Length header to the server. 
For example, &quot;Content-Length: -5191020756686863821&quot; (with a file of 369 bytes). Then, I usually get a message error from the server.

I think that&apos;s because libcurl is build with large file support (making sizeof(curl_off_t) equal to 8), while webkit is not (making sizeof(curl_off_t) equal to 4).

So, in libcurl (lib/http.c): 

#if SIZEOF_CURL_OFF_T &gt; 4
#define FORMAT_OFF_T &quot;lld&quot; 
#else                      
#define FORMAT_OFF_T &quot;ld&quot;
#endif

[...]

   result = add_bufferf(req_buffer,
                           &quot;Content-Length: %&quot; FORMAT_OFF_T &quot;\r\n&quot;,
                           http-&gt;postsize);

outputs a negative value.



In  WebCore/platform/network/curl/ResourceHandleManager.cpp, if I use, in function ResourceHandleManager::setupPOST:

curl_easy_setopt(d-&gt;m_handle, CURLOPT_POSTFIELDSIZE, size);

instead of 

 curl_easy_setopt(d-&gt;m_handle, CURLOPT_POSTFIELDSIZE_LARGE, size)

Content-Length header is correct, and file upload works.

I tried to add AC_SYS_LARGEFILE in configure.ac, but it seems to create aconfig.h which is not sourced by WebCore/platform/network/curl/ResourceHandleManager.cpp

For testing purpose, I have tried to put
#define _FILE_OFFSET_BITS 64 at the very top of WebCore/platform/network/curl/ResourceHandleManager.cpp and it fixes the bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88821</commentid>
    <comment_count>2</comment_count>
    <who name="Marco Barisione">marco.barisione</who>
    <bug_when>2008-08-19 10:12:28 -0700</bug_when>
    <thetext>Definining _FILE_OFFSET_BITS is not enough as CURL could be compiled without large files support even if it&apos;s available on your system, so you would get the opposite problem: passing a 64-bit integer when curl is expecting a 32-bit integer.

IMO this is a problem in the CURL API but we can workaround it checking at run-time for large file support and passing a different type based on the check.

I will write a patch in the next days.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89105</commentid>
    <comment_count>3</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2008-08-22 07:46:06 -0700</bug_when>
    <thetext>&gt; IMO this is a problem in the CURL API but we can workaround it checking at
&gt; run-time for large file support and passing a different type based on the
&gt; check.

I am not sure it is the right thing to do. What you want is to have the same size for curl_off_t in WebKit and in libcURL. It could be done by checking for LFS in libcURL at compile time and enable it in WebKit too (including aconfig.h if necessary). I have tried something along that path that I could post here if you want to try it.

As you said, it is an issue with libcurl but it is currently been tackled [1] and the next release should provide a specific header which should solve this problem and avoid a work-around.

[1] http://curl.haxx.se/lxr/source/TODO-RELEASE</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89108</commentid>
    <comment_count>4</comment_count>
    <who name="Marco Barisione">marco.barisione</who>
    <bug_when>2008-08-22 07:56:42 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; I am not sure it is the right thing to do. What you want is to have the same
&gt; size for curl_off_t in WebKit and in libcURL. It could be done by checking for
&gt; LFS in libcURL at compile time and enable it in WebKit too (including aconfig.h
&gt; if necessary). I have tried something along that path that I could post here if
&gt; you want to try it.

What happens if your distro is using a curl library without large file support when you compile WebKit and that it switches to one with LFS?

aconfig.h should be included by config.h (see bug #20380) but for now we can include it directly if needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89113</commentid>
    <comment_count>5</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2008-08-22 08:52:20 -0700</bug_when>
    <thetext>&gt; What happens if your distro is using a curl library without large file support
&gt; when you compile WebKit and that it switches to one with LFS?

Indeed, we may have this problem again. I was thinking of adding a runtime assertion to detect that kind of (corner?) case but it would not show up for release build and would have a hard time finding the cause. The runtime check for LFS seems to be the way to go for this use case.

However the issue here is that curl_off_t does not have the right size because WebKit did not enable LFS when libcURL did. This is why I proposed the compile time check (and later use the new header). Your runtime solution will not detect that as the problem is at compile time.

&gt; aconfig.h should be included by config.h (see bug #20380) but for now we can
&gt; include it directly if needed.

Nice idea.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92547</commentid>
    <comment_count>6</comment_count>
    <who name="Marco Barisione">marco.barisione</who>
    <bug_when>2008-09-24 10:12:02 -0700</bug_when>
    <thetext>Mike, what do you think about this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92548</commentid>
    <comment_count>7</comment_count>
    <who name="Michael Emmel">mike.emmel</who>
    <bug_when>2008-09-24 10:19:28 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; Mike, what do you think about this?
&gt; 

I think it should be handled in curl itself.

But the best fix is probably to static link the right version of curl instead of depending on the shared library. So at the minimum a static link option for curl should be added that should clear this up.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92699</commentid>
    <comment_count>8</comment_count>
    <who name="Marco Barisione">marco.barisione</who>
    <bug_when>2008-09-25 03:58:45 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; But the best fix is probably to static link the right version of curl instead
&gt; of depending on the shared library. So at the minimum a static link option for
&gt; curl should be added that should clear this up.

Distros would hate us for that. Why not a dynamic check as the solution for this and then also add AC_SYS_LARGEFILE so also other parts of WebKit GTK can benefit from this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92732</commentid>
    <comment_count>9</comment_count>
    <who name="Michael Emmel">mike.emmel</who>
    <bug_when>2008-09-25 09:24:53 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; (In reply to comment #7)
&gt; &gt; But the best fix is probably to static link the right version of curl instead
&gt; &gt; of depending on the shared library. So at the minimum a static link option for
&gt; &gt; curl should be added that should clear this up.
&gt; 
&gt; Distros would hate us for that. Why not a dynamic check as the solution for
&gt; this and then also add AC_SYS_LARGEFILE so also other parts of WebKit GTK can
&gt; benefit from this?
&gt; 

I just suggested it should be and option so we can opt to use the features of the latest version of curl before it gets into distros. Curl itself could use a bit of work to turn it into a good library for browsers static linking and co-development is a good way to move both projects forward. As and example content detection using a &quot;file&quot; command library is missing among other things.
This capability should be implemented in Curl IMHO.

They may hate us but realistically curl needs work and we need to move ahead of the distro for a while if you want to have a excellent connection library.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92734</commentid>
    <comment_count>10</comment_count>
    <who name="Marco Barisione">marco.barisione</who>
    <bug_when>2008-09-25 09:28:08 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; They may hate us but realistically curl needs work and we need to move ahead of
&gt; the distro for a while if you want to have a excellent connection library.

More than hate us they would completely ignore the statically linked library. Most distros do that even when it means to lose functionalities or have bugs, so I really think that a workaround is better.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>92754</commentid>
    <comment_count>11</comment_count>
    <who name="Michael Emmel">mike.emmel</who>
    <bug_when>2008-09-25 10:31:35 -0700</bug_when>
    <thetext>
(In reply to comment #10)
&gt; (In reply to comment #9)
&gt; &gt; They may hate us but realistically curl needs work and we need to move ahead of
&gt; &gt; the distro for a while if you want to have a excellent connection library.
&gt; 
&gt; More than hate us they would completely ignore the statically linked library.
&gt; Most distros do that even when it means to lose functionalities or have bugs,
&gt; so I really think that a workaround is better.
&gt; 

No problem I&apos;m just pointing out that curl/webkit integration has bigger issues that need to be resolved and a route that would allow both groups to work together until they are resolved. I&apos;m not suggesting you not put the workaround in but I felt that this was a good place to insert my overall observation that curl needs refactoring to work well with browsers. Temporarily static linking in a development version of curl focused on browser support puts the project on the right track. Sorry to give a big picture answer its better I guess to keep hacking. I tried to take this approach with my ncurl patch and it looks like we are simply not going to build a good solution using curl.

And sorry for the rant but you need to be aware that curl is it stands now is not a good solution. Its got a number of serious problems that need to be fixed.

Rant off and I&apos;ll go back to my hidey hole.



</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93048</commentid>
    <comment_count>12</comment_count>
      <attachid>23876</attachid>
    <who name="Marco Barisione">marco.barisione</who>
    <bug_when>2008-09-27 09:09:28 -0700</bug_when>
    <thetext>Created attachment 23876
Pass an integer of the right size based on curl&apos;s compile options</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93132</commentid>
    <comment_count>13</comment_count>
      <attachid>23876</attachid>
    <who name="Alp Toker">alp</who>
    <bug_when>2008-09-28 01:25:08 -0700</bug_when>
    <thetext>Comment on attachment 23876
Pass an integer of the right size based on curl&apos;s compile options

I agree this change is necessary since we have no control over which versions of libraries distributors will link against.

&gt;Index: WebCore/platform/network/curl/ResourceHandleManager.cpp
&gt;===================================================================
&gt;--- WebCore/platform/network/curl/ResourceHandleManager.cpp	(revisione 36996)
&gt;+++ WebCore/platform/network/curl/ResourceHandleManager.cpp	(copia locale)
&gt;@@ -3,6 +3,7 @@
&gt;  * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
&gt;  * Copyright (C) 2007 Alp Toker &lt;alp.toker@collabora.co.uk&gt;
&gt;  * Copyright (C) 2007 Holger Hans Peter Freyther
&gt;+ * Copyright (C) 2008 Collabora Ltd.
&gt;  * All rights reserved.
&gt;  *
&gt;  * Redistribution and use in source and binary forms, with or without
&gt;@@ -377,12 +378,24 @@
&gt;     }
&gt; 
&gt;     // Obtain the total size of the POST
&gt;+    // The size of a curl_off_t could be different in WebKit and in cURL depending on
&gt;+    // compilation flags of both. For CURLOPT_POSTFIELDSIZE_LARGE we have to pass the
&gt;+    // right size or random data will be used as the size.
&gt;+    int expectedSizeOfCurlOffT = 0;
&gt;+    if (!expectedSizeOfCurlOffT) {
&gt;+        curl_version_info_data *infoData = curl_version_info(CURLVERSION_NOW);
&gt;+        if (infoData-&gt;features &amp; CURL_VERSION_LARGEFILE)
&gt;+            expectedSizeOfCurlOffT = sizeof(long long);
&gt;+        else
&gt;+            expectedSizeOfCurlOffT = sizeof(int);
&gt;+    }
&gt;+

Looks like there&apos;s something wrong above, since !expectedSizeOfCurlOffT will always be true.

perhaps &apos;int expectedSizeOfCurlOffT&apos; should be static?

I won&apos;t be able to test this one against different versions of curl myself but I&apos;m guessing Marco has already tested it.

Looks good otherwise.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93214</commentid>
    <comment_count>14</comment_count>
      <attachid>23904</attachid>
    <who name="Marco Barisione">marco.barisione</who>
    <bug_when>2008-09-29 03:28:47 -0700</bug_when>
    <thetext>Created attachment 23904
Pass an integer of the right size based on curl&apos;s compile options

Yeah, I forgot a static.

I tested the patch with curl compiled with and without LFS and with WebKit compiled with and without LFS.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93248</commentid>
    <comment_count>15</comment_count>
      <attachid>23904</attachid>
    <who name="Alp Toker">alp</who>
    <bug_when>2008-09-29 11:49:34 -0700</bug_when>
    <thetext>Comment on attachment 23904
Pass an integer of the right size based on curl&apos;s compile options

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>94031</commentid>
    <comment_count>16</comment_count>
    <who name="Jan Alonzo">jmalonzo</who>
    <bug_when>2008-10-03 21:24:42 -0700</bug_when>
    <thetext>Landed in r37281</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>23876</attachid>
            <date>2008-09-27 09:09:28 -0700</date>
            <delta_ts>2008-09-29 03:28:47 -0700</delta_ts>
            <desc>Pass an integer of the right size based on curl&apos;s compile options</desc>
            <filename>curl-upload.patch</filename>
            <type>text/plain</type>
            <size>3544</size>
            <attacher name="Marco Barisione">marco.barisione</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvcGxhdGZvcm0vbmV0d29yay9jdXJsL1Jlc291cmNlSGFuZGxlTWFuYWdl
ci5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PQotLS0gV2ViQ29yZS9wbGF0Zm9ybS9uZXR3b3JrL2N1cmwvUmVzb3Vy
Y2VIYW5kbGVNYW5hZ2VyLmNwcAkocmV2aXNpb25lIDM2OTk2KQorKysgV2ViQ29yZS9wbGF0Zm9y
bS9uZXR3b3JrL2N1cmwvUmVzb3VyY2VIYW5kbGVNYW5hZ2VyLmNwcAkoY29waWEgbG9jYWxlKQpA
QCAtMyw2ICszLDcgQEAKICAqIENvcHlyaWdodCAoQykgMjAwNiBNaWNoYWVsIEVtbWVsIG1pa2Uu
ZW1tZWxAZ21haWwuY29tCiAgKiBDb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R0cDovL2J1Z3Mud2Via2l0Lm9y
Zy9zaG93X2J1Zy5jZ2k/aWQ9MTg4MzIKKyAgICAgICAgW2N1cmxdIGZpbGUgdXBsb2FkIGRvZXMg
bm90IHdvcmsKKworICAgICAgICBUaGUgY3VybF9vZmZfdCBpbnRlZ2VyIHR5cGUgaGFzIGEgZGlm
ZmVyZW50IHNpemUgZGVwZW5kaW5nIGlmIGxhcmdlCisgICAgICAgIGZpbGUgc3VwcG9ydCBpcyBl
bmFibGVkIG9yIG5vdC4gVGhlcmUgaXMgbm8gZGlmZmVyZW50IHB1YmxpYyBBUEkgZm9yCisgICAg
ICAgIHRoZSB0d28gY2FzZXMsIHNvIHRoZSBzYW1lIGZ1bmN0aW9uIGFjY2VwdHMgYSBkaWZmZXJl
bnQgdHlwZSBiYXNlZCBvbgorICAgICAgICBhIGNvbXBpbGF0aW9uIG9wdGlvbiB0aGUgY291bGQg
YmUgZGlmZmVyZW50IGluIFdlYktpdCBhbmQgbGliY3VybC4KKyAgICAgICAgVG8gZml4IHRoZSBi
dWcgd2UgcXVlcnkgbGliY3VybCBhdCBydW50aW1lIGZvciBsYXJnZSBmaWxlIHN1cHBvcnQgYW5k
CisgICAgICAgIHBhc3MgdGhlIHJpZ2h0IHR5cGUgYmFzZWQgb24gdGhhdC4KKworICAgICAgICAq
IHBsYXRmb3JtL25ldHdvcmsvY3VybC9SZXNvdXJjZUhhbmRsZU1hbmFnZXIuY3BwOgorICAgICAg
ICAoV2ViQ29yZTo6UmVzb3VyY2VIYW5kbGVNYW5hZ2VyOjpzZXR1cFBPU1QpOgorCiAyMDA4LTA5
LTI3ICBEYXZpZCBIeWF0dCAgPGh5YXR0QGFwcGxlLmNvbT4KIAogICAgICAgICBSZW5hbWUgZnJh
bWVHZW9tZXRyeSB0byBmcmFtZVJlY3QuICBSZW5hbWUgc2V0RnJhbWVHZW9tZXRyeSB0byBzZXRG
cmFtZVJlY3QuCg==
</data>
<flag name="review"
          id="10760"
          type_id="1"
          status="-"
          setter="alp"
    />
          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>23904</attachid>
            <date>2008-09-29 03:28:47 -0700</date>
            <delta_ts>2008-09-29 11:49:34 -0700</delta_ts>
            <desc>Pass an integer of the right size based on curl&apos;s compile options</desc>
            <filename>curl-upload.patch</filename>
            <type>text/plain</type>
            <size>3459</size>
            <attacher name="Marco Barisione">marco.barisione</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvcGxhdGZvcm0vbmV0d29yay9jdXJsL1Jlc291cmNlSGFuZGxlTWFuYWdl
ci5jcHAKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PQotLS0gV2ViQ29yZS9wbGF0Zm9ybS9uZXR3b3JrL2N1cmwvUmVzb3Vy
Y2VIYW5kbGVNYW5hZ2VyLmNwcAkocmV2aXNpb25lIDM3MDU5KQorKysgV2ViQ29yZS9wbGF0Zm9y
bS9uZXR3b3JrL2N1cmwvUmVzb3VyY2VIYW5kbGVNYW5hZ2VyLmNwcAkoY29waWEgbG9jYWxlKQpA
QCAtMyw2ICszLDcgQEAKICAqIENvcHlyaWdodCAoQykgMjAwNiBNaWNoYWVsIEVtbWVsIG1pa2Uu
ZW1tZWxAZ21haWwuY29tCiAgKiBDb3B5cmlnaHQgKEMpIDIwMDcgQWxwIFRva2VyIDxhbHAudG9r
ZXJAY29sbGFib3JhLmNvLnVrPgogICogQ29weXJpZ2h0IChDKSAyMDA3IEhvbGdlciBIYW5zIFBl
dGVyIEZyZXl0aGVyCisgKiBDb3B5cmlnaHQgKEMpIDIwMDggQ29sbGFib3JhIEx0ZC4KICAqIEFs
bCByaWdodHMgcmVzZXJ2ZWQuCiAgKgogICogUmVkaXN0cmlidXRpb24gYW5kIHVzZSBpbiBzb3Vy
Y2UgYW5kIGJpbmFyeSBmb3Jtcywgd2l0aCBvciB3aXRob3V0CkBAIC0zNzcsMTIg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ZGlmZmVyZW50IHR5cGUgYmFzZWQgb24KKyAgICAgICAgYSBjb21waWxhdGlvbiBvcHRp
b24gdGhlIGNvdWxkIGJlIGRpZmZlcmVudCBpbiBXZWJLaXQgYW5kIGxpYmN1cmwuCisgICAgICAg
IFRvIGZpeCB0aGUgYnVnIHdlIHF1ZXJ5IGxpYmN1cmwgYXQgcnVudGltZSBmb3IgbGFyZ2UgZmls
ZSBzdXBwb3J0IGFuZAorICAgICAgICBwYXNzIHRoZSByaWdodCB0eXBlIGJhc2VkIG9uIHRoYXQu
CisKKyAgICAgICAgKiBwbGF0Zm9ybS9uZXR3b3JrL2N1cmwvUmVzb3VyY2VIYW5kbGVNYW5hZ2Vy
LmNwcDoKKyAgICAgICAgKFdlYkNvcmU6OlJlc291cmNlSGFuZGxlTWFuYWdlcjo6c2V0dXBQT1NU
KToKKwogMjAwOC0wOS0yOSAgVGhpYWdvIE1hY2llaXJhICA8dGhpYWdvLm1hY2llaXJhQHRyb2xs
dGVjaC5jb20+CiAKICAgICAgICAgUmV2aWV3ZWQgYnkgU2ltb24K
</data>
<flag name="review"
          id="10780"
          type_id="1"
          status="+"
          setter="alp"
    />
          </attachment>
      

    </bug>

</bugzilla>