Re: OpenSSL 1.x support?

2024-06-07 Thread Henrik Holst via curl-library
Please do reply to all so your replies goes to the list, I just found which macro that does it and the description in there. Daniel or some one else with deeper knowledge on why this is done are the only ones that can made an informed decision here. /HH Den lör 8 juni 2024 kl 04:08 skrev

Re: OpenSSL 1.x support?

2024-06-07 Thread Henrik Holst via curl-library
done by the m4 macro m4/curl-compilers.m4 with this stated reason: dnl CURL_CONVERT_INCLUDE_TO_ISYSTEM dnl - dnl Changes standard include paths present in CFLAGS dnl and CPPFLAGS into isystem include paths. This is dnl done to prevent GNUC from

Re: OpenSSL 1.x support?

2024-06-07 Thread Henrik Holst via curl-library
Den lör 8 juni 2024 kl 03:40 skrev Alexander Dyagilev : > libssh2 is compiled with openssl 1.x > well something that is linking with curl must be, because AFAIK curl itself doesn't even call functions like EVP_PKEY_get0_type_name (I just grepped for the string in the source tree and cannot

Re: OpenSSL 1.x support?

2024-06-07 Thread Henrik Holst via curl-library
one possible suspect is this: configure: Added /Users/user/desktop/fdm-qml/libcurl-build/../libssh2-build/prebuilt/macos/x86_64/lib to CURL_LIBRARY_PATH check so libssh2 isn't built for openssl3.x and left from a prior compile. Den lör 8 juni 2024 kl 02:47 skrev Alexander Dyagilev : > Yes, but

Re: OpenSSL 1.x support?

2024-06-07 Thread Henrik Holst via curl-library
all of those missing symbols are functions added in OpenSSL 3.0 and the ones used directly by curl (such as X509_STORE_load_path) are all behind ifdefs that check for 3.0 so it sounds like your build configuration is finding the 3.0 include files but the 1.x libs /HH Den lör 8 juni 2024 kl 00:20

Re: "getaddrinfo() thread failed to start" under heavy load

2023-10-16 Thread Henrik Holst via curl-library
could be the limit of number of descriptors : https://linuxhint.com/increase-open-file-limit-ubuntu/ looked briefly at the code and unfortunately there are no error stack so there is really no way of really knowing why the call failed, it can be from fails to do malloc but that rarely happens on

Re: Test server SSL handshake using libcurl

2023-10-06 Thread Henrik Holst via curl-library
if you get 404 then the handshake did work, the 404 is from the http layer and not TLS so if you get that then TLS works (do curl -v just to be sure) /HH Den fre 6 okt. 2023 kl 20:29 skrev Taw via curl-library < curl-library@lists.haxx.se>: > Hi, I am trying to use libcurl to test a handshake

Re: Handling Cloudfare issues

2023-09-30 Thread Henrik Holst via curl-library
I don't think Cloudflare changed anything in their backend. Sites that use CloudFlare can activate a special protection mode, e.g Reserve Bank of New Zealand uses this mode constantly: https://www.rbnz.govt.nz/ so is a good candidate for tests. This mode is supposed to be activated if your site is

Re: Regarding service request 1513650 (fwd)

2023-08-29 Thread Henrik Holst via curl-library
Nice to see that the administrators at MITRE have zero technical knowledge. Denial of service... /HH Den tis 29 aug. 2023 kl 23:20 skrev Daniel Stenberg via curl-library < curl-library@lists.haxx.se>: > I asked MITRE for CVE-2020-19909 to be rejected. Denied. > > -- > > / daniel.haxx.se > >

Re: [EXTERNAL] Re: Getting a list of easy handles in a multi handle - possible?

2023-08-29 Thread Henrik Holst via curl-library
curl_multi_cleanup() have no available parameter to add this so it would require a new function or changing the ABI of libcurl. However curl_multi_setopt() could perhaps have a new option added instead, say CURLMOPT_FREE_EASY_ON_CLEANUP or similar? /HH Den tis 29 aug. 2023 kl 20:49 skrev Dmitry

Re: Getting a list of easy handles in a multi handle - possible?

2023-08-28 Thread Henrik Holst via curl-library
wouldn't an API that updates the list via callbacks when handles are added and removed equal to the application just keeping the list internally like one would have to do today? I don't really see the difference between those two cases. At least they way I see this is that the application does

Re: Getting a list of easy handles in a multi handle - possible?

2023-08-27 Thread Henrik Holst via curl-library
Den sön 27 aug. 2023 kl 10:02 skrev Ray Satiro via curl-library < curl-library@lists.haxx.se>: > On 8/26/2023 2:27 PM, Daniel Stenberg via curl-library wrote: > > Am I missing something or is this something that could be added? > > > Something like this can absolutely be added, and it might even

Re: Ajuda com instalação AutoGPT -Library não carrega

2023-07-08 Thread Henrik Holst via curl-library
I just checked the official git binary for windows from https://gitforwindows.org/ and AFAIK that one doesn't link nor include libcurl so this looks like a non official git being installed. /HH Den lör 8 juli 2023 kl 22:52 skrev Dan Fandrich via curl-library < curl-library@lists.haxx.se>: > On

Re: WebSocket custom port name as in JavaScript websockets

2023-05-25 Thread Henrik Holst via curl-library
AFAIK you are talking about the Sec-WebSocket-Protocol header and that is a normal HTTP header so you can add it using the normal http header functions. So if this had been C and not js then: struct curl_slist *slist = curl_slist_append (NULL, "Sec-WebSocket-Protocol: protocol");

Re: Issue with MAX_COOKIE_HEADER_LEN

2023-05-19 Thread Henrik Holst via curl-library
Yeah it is ofc a complex situation, the web servers themselves does not help much either since basically none of them responds with a proper 413 and instead send a generic 400. When it comes to your #1 to #3 I think that all we can do there is make sure that the documentation for the setting is

Re: Issue with MAX_COOKIE_HEADER_LEN

2023-05-18 Thread Henrik Holst via curl-library
I did some more digging around on what the various http servers uses and while it is 8k on most servers (apache, nginx) it is 16k on IIS but it is also configurable on all http servers. So it can be set to be higher on apache, nginx, IIS and most other http servers out there. So having it be

Re: The application does not have to keep the string around after setting this option

2023-04-20 Thread Henrik Holst via curl-library
luckily the man page for CURLOPT_POSTFIELDS already contains that info: The data pointed to is NOT copied by the library: as a consequence, it must be preserved by the calling application until the associated transfer finishes. This behaviour can be changed (so libcurl does copy

Re: Curl + OpenSSL 3.x is painfully slow on windows

2023-04-17 Thread Henrik Holst via curl-library
ah well streaming does require chunking so that makes sense. Den mån 17 apr. 2023 kl 16:37 skrev Zakrzewski, Jakub < jakub.zakrzew...@scheer-group.com>: > > > So CURLOPT_POSTFIELDSIZE wasn't set? > > Well, yeah, but the story is deeper. > Thanks to fixing the request, we were now able to stream

Re: Curl + OpenSSL 3.x is painfully slow on windows

2023-04-17 Thread Henrik Holst via curl-library
Den mån 17 apr. 2023 kl 16:26 skrev Zakrzewski, Jakub via curl-library < curl-library@lists.haxx.se>: > > > > That's also basically what the CA caching does. > > The caching does a bit more - it stores the parsed bundle. > > > If you ask me, that's almost like begging for problems since you then

Re: Compiling curl 8.0.1 with OpenSSL 3.1.0 - ../lib/.libs/libcurl.so: undefined reference to ...

2023-04-16 Thread Henrik Holst via curl-library
well that is a flag used by libcurl and that it reads in from openssl/macros.h and which one cannot set in the build anyway because I see on the macros.h file that it first unsets it before it does a long ifdef dance to determine weather to set it or not /usr/include/openssl/macros.h : # undef

Re: Compiling curl 8.0.1 with OpenSSL 3.1.0 - ../lib/.libs/libcurl.so: undefined reference to ...

2023-04-16 Thread Henrik Holst via curl-library
https://www.openssl.org/docs/man3.0/man7/OPENSSL_NO_DEPRECATED.html It should IMHO be just -DOPENSSL_NO_DEPRECATED /HH Den sön 16 apr. 2023 kl 20:23 skrev Jeffrey Walton via curl-library < curl-library@lists.haxx.se>: > On Sun, Apr 16, 2023 at 2:06 PM Rahul Sabnis via curl-library > wrote: >

Re: Help using libcurl with HTTP proxy on Android device

2023-04-13 Thread Henrik Holst via curl-library
Great that you got it to work "the proper way". /hh Den tors 13 apr. 2023 03:12David Castillo via curl-library < curl-library@lists.haxx.se> skrev: > Okay, I think I have a solution that can work for me :) I used the > https://curl.se/libcurl/c/CURLOPT_SSL_CTX_FUNCTION.html callback and I'm >

Re: Help using libcurl with HTTP proxy on Android device

2023-04-11 Thread Henrik Holst via curl-library
and of course the code i saw in libcurl was for loading the client cert and there it wasn't the file extension that where used but the value of CURLOPT_SSLKEYTYPE and the man page for that also tells ""DER" format key file currently does not work because of a bug in OpenSSL" So it looks back to

Re: Help using libcurl with HTTP proxy on Android device

2023-04-11 Thread Henrik Holst via curl-library
are they not linked? On Linux they are usually stored as hexdigits.0 so openssl can find it via the hash but then that is just a link to the actual cert file like: lrwxrwxrwx 1 root root 23 dec 5 20:46 f081611a.1 -> Go_Daddy_Class_2_CA.pem /HH Den ons 12 apr. 2023 kl 03:30 skrev David

Re: Help using libcurl with HTTP proxy on Android device

2023-04-11 Thread Henrik Holst via curl-library
howerver looking at the actual code it looks like what openssl calls ASN.1 is actually DER and libcurl have code to load ASN.1 certificates. But for this to work the certificate file must end with .DER (case insensitive). So could it be that the file is stored with the wrong file extension ? /HH

Re: Help using libcurl with HTTP proxy on Android device

2023-04-11 Thread Henrik Holst via curl-library
the main issue for libcurl is that openssl (of which boringssl is a fork) only allows CA certificates in PEM format to be loaded, other types of certificates can be in PEM or DER but CA must be in PEM. So it's really strange (and dumb to be frank) of Google to force the CA certs to be converted to

Re: Help using libcurl with HTTP proxy on Android device

2023-04-11 Thread Henrik Holst via curl-library
well if the plan is to always use this particular proxy then you can always bundle the root cert and point libcurl to it as a local file. AFAIK the ssl callback functions of libcurl could be used to load the cert in DER format and supply it via memory buffer to the ssl library but that requires

Re: libcurl 8.0.1 and mem leaks reported on callback - windows x64 build

2023-04-08 Thread Henrik Holst via curl-library
yeah it's hard to say what the problem is here, I hope some one with more Windows experience can step in with some knowledge. I have run the same test on Linux, and thus gcc, for the last 42 minutes and memory usage have been stable : henrik@Sineya:~$ top -p 115405 top - 05:03:47 up 9:50, 1

Re: libcurl 8.0.1 and mem leaks reported on callback - windows x64 build

2023-04-08 Thread Henrik Holst via curl-library
is the while in main() basically doing: while (true) { PerformCurlWork(); Sleep(3000); } ? /HH Den sön 9 apr. 2023 kl 03:34 skrev Tyler Wilson via curl-library < curl-library@lists.haxx.se>: > Thank you for the feedback so far everyone. It wouldn't surprise me > if the CRT tools in

Re: libcurl 8.0.1 and mem leaks reported on callback - windows x64 build

2023-04-08 Thread Henrik Holst via curl-library
btw this could also be due to (and bear with me because it was ages ago that I did any programming on Windows) you are using one CRT (non debug) of the curl library and another CRT (debug) of your application so when you call curl_easy_perform() then Windows switches to the CRT of the libcurl DLL

Re: libcurl 8.0.1 and mem leaks reported on callback - windows x64 build

2023-04-08 Thread Henrik Holst via curl-library
sounds like the VS2022 CRT debug tools don't unwind the stack before the check so it doesn't call the std:string destructor or something like that. I compiled your code on Linux and run it using Valgrind which is the #1 when it comes to memleak detection and it found none: henrik@Sineya:~$

Re: [Question] Forcing libcurl to use hardware randomization

2023-03-06 Thread Henrik Holst via curl-library
Looking at https://wiki.openssl.org/index.php/Random_Numbers I see the following: To ensure RAND_bytes uses the hardware engine, you must perform three steps: - load the rdrand engine - acquire a handle to the engine

Re: MQTT sub times out

2022-10-25 Thread Henrik Holst via curl-library
ah, sorry now that was the low hanging fruit that I noticed, have no experience with the mqtt protocol in curl. /HH Den tis 25 okt. 2022 kl 09:23 skrev Hamza Farooq : > Hello, > > Good hint, thanks! In my case, size is 1, nmemb is 34 so changing it > to "return nmemb * size" does not make a

Re: MQTT sub times out

2022-10-24 Thread Henrik Holst via curl-library
Hi, this happens because you do return nmemb; in write_data() instead of return nmemb*size; since that is the actual data size in bytes, so curl_easy_perform is waiting for you to consume all data and thus hangs since you never do (or rather don't tell curl that you do). /HH Den mån 24 okt.

Re: curl_multi_poll check breaks previous behavior

2022-09-22 Thread Henrik Holst via curl-library
I don't think Daniel is against using -1 as the value for initine timeout, I think that he simply means that he is willing to accept a patch that both does that AND makes it a documented feature. /HH Den fre 23 sep. 2022 kl 02:34 skrev Matthew Bobowski via curl-library <

Re: Deprecating 4 "wrong" RTMP protocol bits

2022-06-10 Thread Henrik Holst via curl-library
a comma separated string would be the fully future compatible option unless 64 (long long should work for LLP64) is enough for the unknown future. The internal representation could still be a bitfield for performance reasons, but the public API should probably be a more future proof one. /HH Den

Re: curl-multi-socket interface too slow

2022-06-01 Thread Henrik Holst via curl-library
this part also doesn't look right to me: if(events[i].events & EPOLLOUT) { for (int j = 0; j < MAX_CONNECTIONS; j++) { if (events[i].data.fd == sockfd[j]) { index = j;

Re: curl-multi-socket interface too slow

2022-06-01 Thread Henrik Holst via curl-library
I wonder if you in that specific example (the stackexchange one) are hitting some limit in the dns resolver since "domains/s=161.98" which is the max value there would be something like (1 event for dns reply, 1 for connect, 1 for write is what I'm guesstimating at here) ~486 events in epoll per

Re: Fedora and curl-minimal

2022-03-17 Thread Henrik Holst via curl-library
Den tors 17 mars 2022 kl 08:34 skrev Kamil Dudka : > On Thursday, March 17, 2022 3:32:45 AM CET Henrik Holst wrote: > > Another point when it comes to security is that if the version of curl > > provided by the distro does not support the protocols the user needs (and > > sorry for my ignorance

Re: Fedora and curl-minimal

2022-03-16 Thread Henrik Holst via curl-library
Den tors 17 mars 2022 kl 03:23 skrev Patrick Monnerat via curl-library < curl-library@lists.haxx.se>: > > On 3/16/22 14:24, Kamil Dudka wrote: > > Hi Patrick, > Hi Kamil, > > I presume they would remove it completely from the bare distro if it was > > possible, but they need it to support key

Re: Not able to access rtsp stream

2022-02-28 Thread Henrik Holst via curl-library
Den mån 28 feb. 2022 kl 19:19 skrev Ray Satiro via curl-library < curl-library@lists.haxx.se>: > On 2/28/2022 6:43 AM, VINEETH NAIR via curl-library wrote: > > Hi, sorry about the top-posts. I am using libcurl version 7.79.1 and > > the application is exactly the same in the machines in America

Re: Has the time come to drop NSS?

2022-02-21 Thread Henrik Holst via curl-library
Den mån 21 feb. 2022 kl 14:40 skrev Michael Stahl via curl-library < curl-library@lists.haxx.se>: > On 20/02/2022 14.18, Cristian Rodríguez wrote: > > On Fri, Feb 18, 2022 at 12:29 PM Michael Stahl via curl-library > > wrote: > > > >> NSS is much preferred over OpenSSL because it has an ABI; > >

Re: a strlen update

2022-02-14 Thread Henrik Holst via curl-library
Those single byte memcpy() comes from alloc_addbyter() which in turn is called by Curl_dyn_vprintf() and curl_mvaprintf() and I can see from traces that they are e.g called like this: 0.180 us [ 66160] | strlen(".curlrc") = 7; [ 66160] |

Re: a strlen update

2022-02-14 Thread Henrik Holst via curl-library
Den mån 14 feb. 2022 kl 09:11 skrev Daniel Stenberg via curl-library < curl-library@lists.haxx.se>: > On Thu, 10 Feb 2022, Daniel Stenberg via curl-library wrote: > > > In 7.81.0 this made 596 to 600 strlen() calls. > > > > In git master, this now makes 390 to 392 calls. A 33% reduction. > >

Re: Fewer mallocs is better, episode #47

2022-02-10 Thread Henrik Holst via curl-library
Den lör 5 feb. 2022 kl 23:13 skrev Daniel Stenberg : > On Sat, 5 Feb 2022, Henrik Holst wrote: > > > Anyway, I will take a look at it first and then come back with more info > and > > you can all decide then if the proposed changes are too hard to read or > > unusual, I have no problem doing some

Re: A CI job inventory

2022-02-09 Thread Henrik Holst via curl-library
Completely unaware how all this works so take this with a huge grain of salt but it seems like there is much resources wasted on CI when real errors in patches/pull requests happen. So would it be possible to do nested CI checks? With that I mean that if eg "make checksrc" fails then no other CI

Re: Too many calls to the write callback

2022-02-08 Thread Henrik Holst via curl-library
Yes you are correct, I can see it with -v < Transfer-Encoding: chunked Well that answers that one, huge thanks! /HH Den tis 8 feb. 2022 kl 19:42 skrev Ray Satiro via curl-library < curl-library@lists.haxx.se>: > On 2/8/2022 12:42 PM, Henrik Holst via curl-library wrote: > >

Too many calls to the write callback

2022-02-08 Thread Henrik Holst via curl-library
Hi, I'm trying to figure out why I get so many calls to my write callback. This is against a HTTP/1.1 server and with strace I can see that curl receives the whole reply in one single recv (which is translated to a recvfrom by libc) but for some reason my write callback is called 9 times at

Re: infinite "easy_transfer function" wait loop

2022-02-08 Thread Henrik Holst via curl-library
I just wanted to say that you are not alone with this problem, I have seen this happen as well. I have an application that downloads an external link once per second 24x7 and on some seldom but random occasion (perhaps 2-3 times per year) it gets stuck in curl_multi_socket_action(). So far I have

Re: Crash when libcurl invokes prune_dead_connections

2022-02-08 Thread Henrik Holst via curl-library
>From what you submit it looks like data->state.conn_cache is NULL (or pointing to recently freed memory). I would recommend that you run your application under valgrind and try to trigger the error and see what valgrind finds. If this is a use after free, valgrind will point out where it was

Re: Fewer mallocs is better, episode #47

2022-02-05 Thread Henrik Holst via curl-library
Den lör 5 feb. 2022 kl 10:52 skrev Daniel Stenberg : > On Sat, 5 Feb 2022, Henrik Holst wrote: > > > The remaining 109 for google.com and hostmatch() requires a very > intrusive > > patch however since it would require to add a size_t to struct hostname > (aka > > add Howard Chu:s berval string)

Re: Fewer mallocs is better, episode #47

2022-02-04 Thread Henrik Holst via curl-library
Den lör 5 feb. 2022 kl 00:38 skrev Henrik Holst < henrik.ho...@millistream.com>: > > > Den fre 4 feb. 2022 kl 08:00 skrev Daniel Stenberg : > >> On Fri, 4 Feb 2022, Henrik Holst wrote: >> >> > Which leaves 53 strlen calls for curl.se and 490 for google.com, for >> curl.se >> > these are probably

Re: Fewer mallocs is better, episode #47

2022-02-04 Thread Henrik Holst via curl-library
Den fre 4 feb. 2022 kl 08:00 skrev Daniel Stenberg : > On Fri, 4 Feb 2022, Henrik Holst wrote: > > > Which leaves 53 strlen calls for curl.se and 490 for google.com, for > curl.se > > these are probably "no issue" but still no idea where the 490 ones for > > google.com comes from (the traces only

Re: Fewer mallocs is better, episode #47

2022-02-04 Thread Henrik Holst via curl-library
; instead of bare char* strings, > to really make a difference in efficiency. > > > > /HH > > > > > > Den fre 4 feb. 2022 kl 17:32 skrev Howard Chu via curl-library < > curl-library@lists.haxx.se <mailto:curl-library@lists.haxx.se>>: > > > >

Re: Fewer mallocs is better, episode #47

2022-02-04 Thread Henrik Holst via curl-library
ot; ) ) == 0 ) { Now OpenLDAP probably have a reason for doing it this way, but IMHO having to type the string literal twice is error prone. /HH Den fre 4 feb. 2022 kl 17:32 skrev Howard Chu via curl-library < curl-library@lists.haxx.se>: > Daniel Stenberg via curl-library wrote: &

Re: Fewer mallocs is better, episode #47

2022-02-04 Thread Henrik Holst via curl-library
great, I'll run with that. /HH Den fre 4 feb. 2022 kl 16:54 skrev Daniel Stenberg : > On Fri, 4 Feb 2022, Henrik Holst via curl-library wrote: > > > Just have to have consensus on what to call this macro, looking at the > > codebase there is a strong use of CURL_ p

Re: Fewer mallocs is better, episode #47

2022-02-04 Thread Henrik Holst via curl-library
gt; +const char *content, /* content string to find */ > + size_t clen); /* content string length */ > > char *Curl_copy_header_value(const char *header); > > > With optimization enabled will probably do what you want. > > On Fri, Feb 4,

Re: CURLMOPT_MAX_HOST_CONNECTIONS

2022-02-04 Thread Henrik Holst via curl-library
sorry, friday struck to early it seems. Yes poll have nothing to do with it, I was thinking ot WaitForMultipleObjects that have a 64 limit. Den fre 4 feb. 2022 kl 16:36 skrev Daniel Stenberg : > On Fri, 4 Feb 2022, Henrik Holst via curl-library wrote: > > > just thinking out loud

Re: CURLMOPT_MAX_HOST_CONNECTIONS

2022-02-04 Thread Henrik Holst via curl-library
just thinking out loud but 64 looks like poll() is used in this case since that is the per call limit of number of descriptors. /HH Den fre 4 feb. 2022 kl 13:10 skrev Mellergård, Daniel via curl-library < curl-library@lists.haxx.se>: > Hi, > > > > From the documentation, I can see that

Re: Fewer mallocs is better, episode #47

2022-02-03 Thread Henrik Holst via curl-library
did static compile as well. will try out gdb perhaps during the weekend, but we are still talking about 490 data points here. Den fre 4 feb. 2022 kl 03:10 skrev Timothe Litt via curl-library < curl-library@lists.haxx.se>: > > On 03-Feb-22 21:02, Henrik Holst via curl-library wrote:

Re: Fewer mallocs is better, episode #47

2022-02-03 Thread Henrik Holst via curl-library
feb. 2022 kl 02:52 skrev Dan Fandrich via curl-library < curl-library@lists.haxx.se>: > On Thu, Feb 03, 2022 at 08:35:13PM -0500, Timothe Litt via curl-library > wrote: > > On 03-Feb-22 20:09, Henrik Holst via curl-library wrote: > >> the traces only shows that strlen was

Re: Fewer mallocs is better, episode #47

2022-02-03 Thread Henrik Holst via curl-library
I've tried to dive a bit deeper on this subject and still not really sure why google.com despite the redirect triggers so many strlen calls in curl, fetching https://curl.se/ yields only 173 calls so almost 1/4 the amount from the google case. 23% of those for curl.se and 8% for google.com is due

Re: Fewer mallocs is better, episode #47

2022-02-01 Thread Henrik Holst via curl-library
sorry if I was not clear, it did neither, with -O3 gcc 11.2 did either strlen+memcpy or strcpy, no transformation. Den tis 1 feb. 2022 kl 14:08 skrev Cristian Rodríguez < crrodrig...@opensuse.org>: > On Tue, Feb 1, 2022 at 9:46 AM Henrik Holst > wrote: > > > > Tried it quickly in the compiler

Re: Fewer mallocs is better, episode #47

2022-02-01 Thread Henrik Holst via curl-library
AM Henrik Holst via curl-library > wrote: > > > > did find one low hanging fruit and one interesting strcpy > reimplementation: > > > --- a/lib/urlapi.c > > +++ b/lib/urlapi.c > > @@ -1005,9 +1005,7 @@ static CURLUcode seturl(const char *url, CURLU *u, > uns

Re: Fewer mallocs is better, episode #47

2022-02-01 Thread Henrik Holst via curl-library
I guess, I have zero experience with git or github but I'll have a try. /HH Den tis 1 feb. 2022 kl 13:09 skrev Daniel Stenberg : > On Tue, 1 Feb 2022, Henrik Holst wrote: > > > did find one low hanging fruit and one interesting strcpy > reimplementation: > > Nice! Want to make a PR out of that?

Re: Fewer mallocs is better, episode #47

2022-02-01 Thread Henrik Holst via curl-library
did find one low hanging fruit and one interesting strcpy reimplementation: henrik@Sineya:~/utveckling/repositories/curl$ git diff diff --git a/lib/base64.c b/lib/base64.c index be6f163dc..c84d3ca3d 100644 --- a/lib/base64.c +++ b/lib/base64.c @@ -273,7 +273,7 @@ static CURLcode

Re: Fewer mallocs is better, episode #47

2022-01-28 Thread Henrik Holst via curl-library
yes, hence the quotation marks and the "if they even can be reduced" caveat ;). I have to look over what curl is calling strlen on, tried to run ltrace but the compiled version on Ubuntu seems to be compiled in a way that prohibits ltrace from finding any libcalls (it did find syscalls) so I'll

Re: Fewer mallocs is better, episode #47

2022-01-28 Thread Henrik Holst via curl-library
actually that was quite a lot more than I expected from a single fetch of a 14527 bytes page. Now I have no idea how many of those that OpenSSL performed, but 686 calls to strlen for a fetch that yields 25 http headers in total (for which strlen probably shouldn't be called even once) sounds like

Re: Fewer mallocs is better, episode #47

2022-01-27 Thread Henrik Holst via curl-library
rogram > to make single use of a connection the throughput falls off a cliff edge. I > am beginning to think there is a problem with the TCP/IP stack > implementation that limits usage with many connections. > > James Read > > >> >> /HH >> >> Den tors 27 jan.

Re: Fewer mallocs is better, episode #47

2022-01-27 Thread Henrik Holst via curl-library
to download a much larger file than just the front page and see if that changes things. /HH Den tors 27 jan. 2022 kl 12:55 skrev James Read : > > > On Thu, Jan 27, 2022 at 11:48 AM Henrik Holst via curl-library < > curl-library@lists.haxx.se> wrote: > >> depends on archite

Re: Fewer mallocs is better, episode #47

2022-01-27 Thread Henrik Holst via curl-library
depends on architecture, AFAIK if you compile for 64-bit Windows then __fastcall is completely ignored since the MS compiler uses the "Microsoft x64 calling convention" there regardless of what one types according to https://en.wikipedia.org/wiki/X86_calling_conventions /HH Den tors 27 jan. 2022

Re: Fewer mallocs is better, episode #47

2022-01-27 Thread Henrik Holst via curl-library
sizeof have been a compile time constant since inception, however since C99 it can also be used on variable length arrays and for those it of course have to be a runtime operation. Perhaps OpenLDAP used variable length arrays to a huge degree? strlen() is one clear candidate for some

Re: Fewer mallocs is better, episode #47

2022-01-26 Thread Henrik Holst via curl-library
that is wonderful to see! /HH Den ons 26 jan. 2022 kl 10:24 skrev Daniel Stenberg via curl-library < curl-library@lists.haxx.se>: > Hi, > > Just wanted to share this fun fact with you all. > > Here's my test command line: > > curl -sL https://google.com -o /dev/null > > I ran this command

Re: Persistent connections / https

2022-01-14 Thread Henrik Holst via curl-library
Hi, see: https://everything.curl.dev/libcurl/connectionreuse the connection cache that keeps old connections for reuse is stored per multi-handle so by the way your application is designed it should all work out of the box. For the second question, the multi handle is just to manage a bunch of

Re: core dump on curl function call

2021-10-18 Thread Henrik Holst via curl-library
And if you are running on Linux/BSD/Unix then run your application under valgrind to see if that catches anything suspicious (it usually does). /HH Den mån 18 okt. 2021 kl 10:20 skrev treesa fairy joseph via curl-library < curl-library@lists.haxx.se>: > Thanks, I will do that. > > On Mon, Oct

Re: A canonical URL host name dilemma

2021-10-09 Thread Henrik Holst via curl-library
#D would most likely be the preferred way if it's possible, however it sounds both brittle and the "works differently if not built with IDN support" gives it the kind of "it depends" quality that one perhaps not want from this API? In essence I think it boils down to the use case of extracting

Re: Compilation issues with bufref in 7.78.0

2021-09-01 Thread Henrik Holst via curl-library
I just downloaded curl-7.78.0.tar.gz to check and the lib/bufref.h does not contain any #include. Something bad must have happened to your download or during unpacking. This is how the file looks in the archive: #ifndef HEADER_CURL_BUFREF_H #define HEADER_CURL_BUFREF_H