Re: scan-build-11 warnings

2021-05-08 Thread Patrick Monnerat via curl-library
On 5/8/21 12:14 PM, Daniel Stenberg via curl-library wrote: Hi friends! I ran scan-build-11 against the current git master curl code and it generates two warnings that I just cannot understand and at the same time I cannot easily silence. We use scan-build in the CI (travis), but that runs

Re: libcurl LDAP in asyncmod

2021-05-01 Thread Patrick Monnerat via curl-library
On 5/1/21 10:15 PM, Fulup Ar Foll wrote: @patrick:  retrieving connection code with LDAP works in both synchronous and asynchronous mode and not only in HTTP,TFTP,... There are two things: - the curl result code of type CURLcode: this one is always available as this is the value

Re: libcurl LDAP in asyncmod

2021-04-30 Thread Patrick Monnerat via curl-library
On 4/30/21 4:58 PM, Fulup Ar Foll via curl-library wrote: curl_easy_getinfo(httpRqt->easy, CURLINFO_RESPONSE_CODE, >status); return ZERO Question: how to retrieve conection-deny status in asynchronous mode ? From the documentation at https://curl.se/libcurl/c/CURLINFO_RESPONSE_CODE.html,

extra zero-terminator in SASL Kerberos

2021-04-30 Thread Patrick Monnerat via curl-library
While attempting to implement sasl in openldap, I'm facing with a Kerberos problem. In Curl_auth_create_gssapi_security_message(), a comment says: /* Populate the message with the security layer, client supported receive    message size and authorization identity including the 0x00 based   

Re: POST Request with non-null-terminated string

2021-04-23 Thread Patrick Monnerat via curl-library
On 4/23/21 5:02 PM, Milen Nikolov via curl-library wrote: the curl function (CURLOPT_POSTFIELDS) takes as argument a c-string. In my string there are also NUL characters, which have to be sent. When I try sending the request the body is truncated at the first NUL chararcter. Did you try

Re: difficulties with SSL certs

2021-04-08 Thread Patrick Monnerat via curl-library
On 4/8/21 9:31 AM, Dennis Clarke via curl-library wrote: So I looked into the location where the ssl certs "should" be given my curl config : $ ./configure --prefix=/opt/bw --disable-dependency-tracking \   --disable-silent-rules --without-gnu-ld --enable-shared \   --enable-static \  

Re: Removing the ASCII Art

2021-04-01 Thread Patrick Monnerat via curl-library
On 4/2/21 12:58 AM, Daniel Stenberg via curl-library wrote: I agree that the ASCII art doesn't fill any practical purpose. But I'm still hesitant to remove it! I think primarily because of two reasons that are related to each other:  - the ASCII art makes the header look nice and unique in

Re: Problems with nss 3.59

2021-01-13 Thread Patrick Monnerat via curl-library
On 1/13/21 9:28 AM, Daniel Stenberg wrote: On Mon, 11 Jan 2021, Patrick Monnerat wrote: Test 300 hanging can be explained by https://bugzilla.mozilla.org/show_bug.cgi?id=1679290. This patch is not applied to Fedora 33 stock nss. Ah. Yes that bug caused immediate problems for curl users.

Re: Problems with nss 3.59

2021-01-13 Thread Patrick Monnerat via curl-library
On 1/13/21 9:28 AM, Daniel Stenberg wrote: On Mon, 11 Jan 2021, Patrick Monnerat wrote: Test 300 hanging can be explained by https://bugzilla.mozilla.org/show_bug.cgi?id=1679290. This patch is not applied to Fedora 33 stock nss. Ah. Yes that bug caused immediate problems for curl users.

Problems with nss 3.59

2021-01-11 Thread Patrick Monnerat via curl-library
On 1/10/21 11:57 PM, Daniel Stenberg wrote: On Sun, 10 Jan 2021, Patrick Monnerat wrote: Not for me with NSS/3.60. Test 300 works fine here. Fedora 33 stock nss 3.59.0 here. Fired up a VM with an older distro. Current curl master with NSS/3.26.2 - also ran fine. (except that unit test

Re: conn.data considered bad

2021-01-10 Thread Patrick Monnerat via curl-library
On 1/10/21 10:57 PM, Daniel Stenberg wrote: On Sun, 10 Jan 2021, Patrick Monnerat wrote: Plase note that nss seems cursed (even in the master branch): test suite gives valgrind errors and test 300 never finishes. Not for me with NSS/3.60. Test 300 works fine here. Fedora 33 stock nss

Re: conn.data considered bad

2021-01-10 Thread Patrick Monnerat via curl-library
On 1/10/21 5:59 PM, Daniel Stenberg wrote: On Sun, 10 Jan 2021, Patrick Monnerat wrote: Could be turned at first as: void abcd(struct Curl_easy *data) abcd(conn->data); Sure it can, and if you can come up with a way where that helps then good for you. In my head that's just an

Re: conn.data considered bad

2021-01-10 Thread Patrick Monnerat via curl-library
On 1/10/21 2:32 PM, Daniel Stenberg wrote: On Sun, 10 Jan 2021, Patrick Monnerat via curl-library wrote: Considering the large number of references, I would suggest starting to fix this "bottom up" by smaller commits rather than having a big patch, even if it increases the refer

Re: conn.data considered bad

2021-01-10 Thread Patrick Monnerat via curl-library
On 1/8/21 3:51 PM, Daniel Stenberg via curl-library wrote: Hi all, Here's something that's been itching in me for a long time. Something I've even (twice!) tried to fix. Both times my patch ended up so huge and complicated for me that I had to give it and postpone the idea. Put shortly:

Re: curl_mime

2020-06-24 Thread Patrick Monnerat via curl-library
On 6/24/20 1:01 PM, Byron Van der Merwe via curl-library wrote: Hi, I get the following error when compiling my code using curl_mime. undefined reference to `curl_mime_init' mimeTest.c /mimeTest/src line 28 C/C++ Problem. This is for all mime references. I also found that the following

Re: Memory leak with curl_multi_socket_action

2020-05-26 Thread Patrick Monnerat via curl-library
On 5/26/20 1:15 AM, James Read via curl-library wrote: git clone https://github.com/JamesRead5737/libcurlmemoryleak.git No need to make. Just compile with gcc crawler.c -g -lssl -lcurl Run valgrind with valgrind -v --tool=memcheck --leak-check=full --show-reachable=yes --track-origins=yes

Re: dynbuf: PR #5300

2020-05-01 Thread Patrick Monnerat via curl-library
On 4/30/20 3:10 PM, Daniel Stenberg via curl-library wrote: Hi team, In PR 5300 I'm introducing a library-wide change that I wanted to make you all aware of! # Feedback? I think there is also the sequence at https://github.com/curl/curl/blob/master/packages/OS400/ccsidcurl.c#L855 that

Re: Retrieving the local address between connect() and HTTP

2020-04-26 Thread Patrick Monnerat via curl-library
On 4/26/2020 4:44 PM, Jean-Francois Dockes wrote: Thanks for the CURLOPT_CONNECT_ONLY pointer. Is there something to prevent me from using the resulting socket fd with CURLOPT_OPENSOCKETFUNCTION / CURLOPT_SOCKOPTFUNCTION ? I see that this is a bit convoluted, but it gains me the use of the

Re: Imagining a thread-safe curl_global_init

2020-03-01 Thread Patrick Monnerat via curl-library
On 3/1/20 11:47 AM, Daniel Stenberg via curl-library wrote: There are at least three remaining issues left. About curl_version*: The returned information is invariant though each call to these functions: IMHO the only reason why they are not thread-safe is (except for possible non

Re: Test 323 fails, even on Intel processor

2020-01-28 Thread Patrick Monnerat via curl-library
On 1/28/20 7:56 AM, Daniel Stenberg wrote: Did you build with any other special options, like sanitizers etc? export CPPFLAGS="-DCURL_DOES_CONVERSIONS -DHAVE_ICONV -DCURL_ICONV_CODESET_OF_HOST='\"ISO8859-1\"'" export CFLAGS="-g -O3" ./configure --prefix=/usr --with-ssl --without-gnutls

Test 323 fails, even on Intel processor

2020-01-27 Thread Patrick Monnerat via curl-library
With Fedora 31 x86_64, openssl 1.1.1d, I get now the same test 323 failure as Dan on arm (https://curl.haxx.se/mail/lib-2019-10/0038.html). So this problem is probably not related to arm, but to a (range of) openssl version, or the dummy https server. I've tried to dig in libcurl openssl

Re: curl_mime_data_cb() with curl_easy_duphandle()

2020-01-03 Thread Patrick Monnerat via curl-library
On 1/2/20 11:29 AM, Christoph M. Becker via curl-library wrote: Hi all, first, a happy new year to all of you! Hi Christoph, Best wishes to you too. I'm looking for clarification of the behavior of curl_mime_data_cb(). Since I'm having to deal with handles possibly duplicated by

Re: help me improve behavior on Windows?

2019-10-06 Thread Patrick Monnerat via curl-library
On 10/6/19 10:59 AM, Daniel Stenberg via curl-library wrote: That change was done using socketpair() and therefor it unfortunately only works on linux and unix-like systems. I've written it based on documentation, google searches and repeated CI runs. ** I have not used it myself on

Re: Adding a feature to curl: disabling partial range verification

2019-09-12 Thread Patrick Monnerat via curl-library
On 9/12/19 5:54 PM, Daniel Stenberg via curl-library wrote: On Thu, 12 Sep 2019, philippe marguinaud via curl-library wrote: SIZE ICMSHFCSTINIT < 213 File: ICMSHFCSTINIT, Size = 860160 According to https://www.rfc-editor.org/rfc/rfc3659.html#section-4.1 that is very clear about the 213

Re: libcurl usage on os400 (ccsid troubles)

2019-09-12 Thread Patrick Monnerat via curl-library
On 9/12/19 1:23 PM, Александр wrote: Hello, Patrick. Hi Aleksandr, Please use the mailing list at https://cool.haxx.se/mailman/listinfo/curl-library or create a github issue for all curl library related issues: they might interest other people as well and since I do not have access to an

Re: setting Interface precedence in libcurl

2019-08-08 Thread Patrick Monnerat via curl-library
On 8/7/19 11:42 PM, Daniel Stenberg via curl-library wrote: On Wed, 7 Aug 2019, Praveen Pvs via curl-library wrote: Is there way to set the precedence of interface(media/network) in libcurl? I wanted to set the order as ETH0, WLAN0, GPRS0,BT/WLAN libcurl only lets you set a single interface

Re: Dealing with certificates when using custom OpenSSL build with curl

2019-03-22 Thread Patrick Monnerat via curl-library
On 3/22/19 3:12 PM, Andreas Falkenhahn via curl-library wrote: When I use curl with the system's default SSL stack (e.g. DarwinSSL on macOS, Schannel on Windows, pre-installed OpenSSL on Linux) I don't have to use CURLOPT_CAINFO to tell curl which certificates to use at all. Instead, curl

Re: CURLOPT_SSL_VERIFYHOST with raw IP addresses

2019-01-31 Thread Patrick Monnerat via curl-library
On 1/31/19 3:43 PM, Martin Galvan via curl-library wrote: Hi all, My application is currently setting CURLOPT_SSL_VERIFYHOST to 2 in order to enable cert identity verification. However, I saw that passing the remote host's IP address to libcurl (as opposed to the hostname) results on the

URL API

2018-10-30 Thread Patrick Monnerat via curl-library
I know this is a very young API that will only be released tomorrow, but: Is there any reason for not having a curl_url_strerror() function, as we already have curl_{easy,multi,share}_strerror() ? --- Unsubscribe:

Re: CURLOPT_ACCEPT_ENCODING and unknown / unsolicited encodings

2018-08-22 Thread Patrick Monnerat via curl-library
On 08/22/2018 04:43 PM, Rainer Canavan via curl-library wrote: Apologies for dredging up an issue that has been apparently been in published curl versions since at least about a year, but we've only just encountered it while upgrading a system from Ubuntu 17.10 to 18.04. The relevant commit is

Re: wildcard matching

2018-01-28 Thread Patrick Monnerat via curl-library
On 01/28/2018 11:58 PM, Daniel Stenberg wrote: On Sun, 28 Jan 2018, Daniel Stenberg wrote: Yes, I noticed this too and it is highly annoying since it now keeps making our CI builds red. I tried to reproduce it on my Mac but for some reason it doesn't fail when I run it! :-/ I managed to

Re: wildcard matching

2018-01-27 Thread Patrick Monnerat via curl-library
On 01/27/2018 10:09 PM, Daniel Stenberg wrote: On Sat, 27 Jan 2018, Patrick Monnerat via curl-library wrote: From the curl_fnmatch.c code and unit1307.c tests, I can see that currently, a negated character set pattern can match the end of string. Example: "a" is matched by pat

wildcard matching

2018-01-26 Thread Patrick Monnerat via curl-library
From the curl_fnmatch.c code and unit1307.c tests, I can see that currently, a negated character set pattern can match the end of string. Example: "a" is matched by pattern "a[^b]". It is not what shell globing does: the end of data can only be matched by the end of the pattern. Is it

Re: curl_formadd and empty content?

2018-01-26 Thread Patrick Monnerat via curl-library
On 01/26/2018 01:37 PM, Christian Schmitz wrote: Does someone know how to pass empty text to curl_formadd for content of a field? As far as I see, empty fields are skipped. So passing "x" as content, shows field with x. But passing "" as content, skips field. What do you mean by "skipped"?

Re: contracting around curl and libcurl

2018-01-13 Thread Patrick Monnerat via curl-library
Daniel Stenberg wrote: > I'm occasionally getting contacted by people and companies who're looking > for commercial help with curl and libcurl. Developing apps, installing libcurl, > debugging libcurl-using apps and similar tasks. > If *you* are a contractor or otherwise intersted in being

Re: Leak when sending multipart/form-data repeatedly

2017-12-20 Thread Patrick Monnerat via curl-library
On 12/20/2017 03:07 PM, Patrick Monnerat via curl-library wrote: On 12/19/2017 05:31 PM, Martin Galvan via curl-library wrote: Hi everyone, Hi Martin,   I'm testing the following program (replace URL by something real): .. When I run this, Valgrind shows the following: .. ==29988

Re: Leak when sending multipart/form-data repeatedly

2017-12-20 Thread Patrick Monnerat via curl-library
On 12/19/2017 05:31 PM, Martin Galvan via curl-library wrote: Hi everyone, Hi Martin, I'm testing the following program (replace URL by something real): ... When I run this, Valgrind shows the following: ... ==29988== 176 (32 direct, 144 indirect) bytes in 1 blocks are definitely lost

Re: Sending email to gmail account

2017-12-10 Thread Patrick Monnerat via curl-library
On 12/10/2017 09:47 PM, Sean MacLennan wrote: Connected_to_74.125.124.26_but_sender_was_rejected./Remote_host_said:_555_5.5.2_Syntax_error._a188si5053814itg.1_-_gsmtp/ #define FROM"Sean MacLennan " #define TO "" I googled for you about it

Re: Curl build doesn't recognize ZLIB and OpenSSL when specifying install directories

2017-11-27 Thread Patrick Monnerat via curl-library
On 11/27/2017 11:53 AM, Thomas van Hesteren via curl-library wrote: I'm trying to build Curl with support for: OpenSSL, ZLIB and NGHTTP2. Note that I'm building from Ubuntu to Windows (32-bit) host: |i686-w64-mingw32|. it comes back with the configuration menu which shows me that ZLIB and

Re: curl 7.56.0 build problems

2017-11-12 Thread Patrick Monnerat via curl-library
On 11/12/2017 05:57 PM, Daniel Stenberg wrote: On Sun, 12 Nov 2017, Michael Felt wrote: In any case - what ever the cross-dependencies there are between zlib.h and openssl.h (I am using 1.0.2j atm) - 7.54.1 has no issue, while 7.56.0 does, as does master. This problem is caused zlib which

Re: curl 7.56.0 build problems

2017-11-12 Thread Patrick Monnerat via curl-library
On 11/12/2017 03:19 PM, Michael Felt wrote: On 12/11/2017 14:44, Patrick Monnerat via curl-library wrote: The problem has probably been introduced by commit https://github.com/curl/curl/commit/a243ce7ab289f0e7bb8a6b90b40fcf8fa62428bf. Maybe Johannes can help? I suspect not - as I

Re: curl 7.56.0 build problems

2017-11-12 Thread Patrick Monnerat via curl-library
On 11/12/2017 01:36 PM, Michael Felt wrote: So, are you defining 'free_func'? - Looking for that now, but this 'redefine' did not happen in 54.1 - which is the last version I have been able to build. No, but zlib.h does, as a typedef. openssl/crypto.h defines it as a structure field and

Re: Request: flag for delayed start of HTTP until STDIN sends EOF

2017-10-30 Thread Patrick Monnerat via curl-library
On 10/30/2017 06:25 PM, Rudy via curl-library wrote: On 10/10/2017 02:06 AM, Erik Johansson wrote: On 9 October 2017 at 19:17, Rudy via curl-library > wrote: Goal: slow_script.pl | curl

Re: Compiling curl on AS400 with ILE C

2017-10-19 Thread Patrick Monnerat via curl-library
On 10/19/2017 11:21 AM, Franco Lombardo via curl-library wrote: It works!!! Thank you very much for your help!!! Great! this was a pleasure. I created a small shell script for the complation phase, which I called make-OS400.sh. Here it is: Do you think it could be useful? No, because

Re: Compiling curl on AS400 with ILE C

2017-10-18 Thread Patrick Monnerat via curl-library
On 10/18/2017 03:19 PM, Franco Lombardo via curl-library wrote: *=GRAVE===> a - CZM0205 £error "SIZEOF_CURL_OFF_T not defined" Another symbol that has recently moved to the configuration header file. I've changed the os400 branch accordingly. Please pull it and test. Thanks.

Re: I'm awarded, for curl

2017-10-18 Thread Patrick Monnerat via curl-library
On 10/18/2017 09:35 AM, Daniel Stenberg wrote: Hi friends! I've been awarded[1] the Swedish Polhemspriset (Polhem Prize) 2017, for curl. The details are in my blog post. I do however want to express my gratitude and thanks here to you all, my friends and fellow hackers. All you who

Re: Compiling curl on AS400 with ILE C

2017-10-17 Thread Patrick Monnerat via curl-library
On 10/17/2017 03:22 PM, Franco Lombardo via curl-library wrote: There's still the same error in the VTLS module, so the SRVPGM hasn't been created yet. Well, you can't have exactly the same error unless you messed up with source modules or logs because the source line has changed:

Re: Compiling curl on AS400 with ILE C

2017-10-17 Thread Patrick Monnerat via curl-library
On 10/17/2017 09:26 AM, Franco Lombardo via curl-library wrote: CPD5D1D: * MODULE WARNLESS object in CURL library not found. Module WARNLESS failed to compile. You should find compilation errors for it in the log file. I suspect the problem is the recent addition of symbol SIZEOF_LONG (not

Re: R: Compiling curl on AS400 with ILE C

2017-10-16 Thread Patrick Monnerat via curl-library
On 10/16/2017 09:31 PM, Franco Lombardo via curl-library wrote: For confirmation of proper ASCII compilation, Maybe look at the externally referenced symbol names using DSPMOD on this module: qadrt procedure >names have a mangled form (something as fputc_a or a_fputc, I don't remember

Re: Compiling curl on AS400 with ILE C

2017-10-16 Thread Patrick Monnerat via curl-library
On 10/16/2017 06:25 PM, Franco Lombardo via curl-library wrote: Hi all, I can't get out from this problem. I think there's something wrong in the import path, as if the compiler didn't get the *INCDIRFIRST still using '/QIBM/include before' '/qibm/proddata/qadrt/include' I attach below

Re: curl : 7.56 multi form post

2017-10-14 Thread Patrick Monnerat via curl-library
On 10/14/2017 06:48 AM, Ray Satiro via curl-library wrote: On 10/13/2017 8:39 AM, Patrick Monnerat via curl-library wrote: On 10/13/2017 12:55 PM, Sasikala Raju wrote: With curl 7.56 , multi form post have some discrepancy in sending the data. Why is the disposition header changed ? How can

Re: curl : 7.56 multi form post

2017-10-13 Thread Patrick Monnerat via curl-library
On 10/13/2017 12:55 PM, Sasikala Raju wrote: With curl 7.56 , multi form post have some discrepancy in sending the data. Why is the disposition header changed ? How can we force form data instead of attachment. Private: 002e: Content-Disposition: form-data; name="filename" -> 7.54

Re: Compiling curl on AS400 with ILE C

2017-10-11 Thread Patrick Monnerat via curl-library
On 10/11/2017 10:30 AM, Franco Lombardo via curl-library wrote: Hi all, is there anyone who could help me about compiling curl with ILE C on AS40 (not with the AIX-Like environment called PASE)? I can try to help you if you have specific questions, as I'm the former OS400 version

Re: Form data

2017-09-20 Thread Patrick Monnerat via curl-library
On 09/20/2017 04:16 PM, Demi Obenour via curl-library wrote: Hi Demi, First, you should read this mailing list's etiquette (https://curl.haxx.se/mail/etiquette.html) before posting like you did. In particular 2.4 and 2.7. Would it be possible to not require NUL-termination? Ensuring

Re: nul bytes in form field names

2017-09-19 Thread Patrick Monnerat via curl-library
On 09/19/2017 11:18 PM, Daniel Stenberg wrote: Please note this will affect the form API compatibility. Mostly theoretically, right? I mean the old API didn't really send names properly with embedded zeroes either, did it? I never tested it in real conditions, but considering the now defunct

Re: nul bytes in form field names

2017-09-19 Thread Patrick Monnerat via curl-library
On 09/19/2017 03:55 PM, Daniel Stenberg wrote: According to standards, nul bytes are allowed and significant characters in form field names. This practice is however discouraged since it may lead to header parsing errors or be understood by servers as an attack attempt. In addition, header

nul bytes in form field names

2017-09-19 Thread Patrick Monnerat via curl-library
According to standards, nul bytes are allowed and significant characters in form field names. This practice is however discouraged since it may lead to header parsing errors or be understood by servers as an attack attempt. In addition, header syntaxes containing nul bytes are now deprecated

Coverall failure ?

2017-09-07 Thread Patrick Monnerat via curl-library
It seems we currently have a problem with coverall: in https://coveralls.io/builds/13167391/source?filename=lib%2Fformdata.c -- Source Not Available The file "lib/formdata.c" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.

Re: Travis CI proposal

2017-09-07 Thread Patrick Monnerat via curl-library
On 09/07/2017 11:45 AM, Daniel Stenberg wrote: I'll be on the road since tomorrow for 10 days with limited internet access: maybe someone can "take the baby" in the meantime Sure! Thanks ! In all cases, I do not master the Travis CI thing (step 2) and I would prefer the change is done

Re: Travis CI proposal

2017-09-07 Thread Patrick Monnerat via curl-library
On 09/07/2017 07:27 AM, Daniel Stenberg wrote: Maybe we should determine iconv() argument types at configure time to avoid these warnings, then check as shown above in Travis CI. Yes, that sounds excellent! We could *possibly* get away with just #ifdefs for it, since then it'll be much

Travis CI proposal

2017-09-06 Thread Patrick Monnerat via curl-library
There are currently no tests at all about character code conversion, supposed to be used on at least the TPF platform. I have locally added to CFLAGS "-DCURL_DOES_CONVERSIONS -DHAVE_ICONV -DCURL_ICONV_CODESET_OF_HOST='\"ISO8859-1\"'" to enable an identity conversion on the Linux platform:

Re: Mime API landed in github master

2017-09-03 Thread Patrick Monnerat via curl-library
On 09/03/2017 10:54 PM, Daniel Stenberg wrote: On Sun, 3 Sep 2017, Patrick Monnerat wrote: If you tell me when the multissl function has been moved to its place in curl.h, I can work on 1135 and soname. Done now, in commit 0d4a6355a. Soname bumped, test 1135 enabled in commit 1ab9e9b50.

Re: Mime API landed in github master

2017-09-03 Thread Patrick Monnerat via curl-library
On 09/03/2017 11:30 AM, Daniel Stenberg wrote: The SONAME bump would only be required for OS/400 and VMS as far as I can tell (those are the systems specifically mentioned we created test1135 for). I think it is very important to not bump it for the systems that don't need to bump it. SONAME

Mime API landed in github master

2017-09-02 Thread Patrick Monnerat via curl-library
I've just pushed the new mime API code, doc, examples and tests. According to PR https://github.com/curl/curl/pull/1839 discussion, some things have been done, some others left to do: - curl_mime_file() has been removed, although I hope we may have something like that for unnamed open files

Re: Formpost API replacement

2017-08-17 Thread Patrick Monnerat via curl-library
On 08/17/2017 06:07 PM, Patrick Monnerat via curl-library wrote: I have started coding the old form API replacement as a wider MIME API. It's still incomplete, although already usable. I forgot to mention: - curl_mime_data_cb() takes 2 more arguments: these are optional callback pointers

Formpost API replacement

2017-08-17 Thread Patrick Monnerat via curl-library
I have started coding the old form API replacement as a wider MIME API. It's still incomplete, although already usable. Please check https://github.com/monnerat/curl/tree/mime. The base spec I used is https://github.com/curl/curl/wiki/formpost-API-redesigned, slightly updated: - All

Re: Improving form post API

2017-08-06 Thread Patrick Monnerat via curl-library
On 07/07/2017 11:34 AM, Daniel Stenberg wrote: I added curl_form_data_cb() to the wiki page. Seems to me this is not enough: we could have a rewind callback to support redirections and a "readdata free" callback function would be a great feature to release resources upon deletion. What

Re: Time to disable "Expect: 100-continue" by default?

2017-07-17 Thread Patrick Monnerat via curl-library
On 07/17/2017 11:50 PM, Jeroen Ooms via curl-library wrote: What is the proper way to disable the 'Expect' header which will work across versions of libcurl? Does this work? assert(curl_easy_setopt(handle, CURLOPT_EXPECT_100_TIMEOUT_MS, 0L)); The best way is to set an "Expect:" header as

Re: Improving form post API

2017-07-16 Thread Patrick Monnerat via curl-library
On 06/22/2017 09:19 AM, Patrick Monnerat via curl-library wrote: On 06/22/2017 12:20 AM, Daniel Stenberg wrote: The form API would need to become a much more generic MIME API for it to work good for that. But sure, if someone has use cases in mind and want to suggest how the current form API

Re: Improving form post API

2017-06-22 Thread Patrick Monnerat via curl-library
On 06/22/2017 12:20 AM, Daniel Stenberg wrote: On Wed, 21 Jun 2017, Patrick Monnerat via curl-library wrote: As we may now be ready to add new entry points for form handling, I wonder if the new form API should not be extended to some more generic API, capable of building a data stream from

Re: Improving form post API

2017-06-21 Thread Patrick Monnerat via curl-library
On 06/20/2017 10:15 PM, Andrew wrote: Daniel identifies three issues with the current API: * complicated (multitple varargs, several ways to do the same thing) * error-prone (due to the above) * the use of the public struct makes it hard to change - and yet hardly any users