Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: libcurl hang (v2)

From: MS via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 21 Oct 2020 23:38:45 +0100

Dan, thanks for responding.

The software is written in Eiffel, with which I would guess you are
not familiar. And you would need to read through a significant
number of classes to get the overall picture.

I have discovered the problem only occurs when using libevent2 to
drive the multi interface. There is no issue using the easy interface
directly, nor using `multi_poll'.

Looks like a problem with my use of the sockets interface, but curious
that it doesn't hang when using TOR as a proxy.

FWIW, here are the options being set on the easy handle:

CURLOPT_VERBOSE: 1
CURLOPT_IPRESOLVE: CURL_IPRESOLVE_V4
CURLOPT_PROXY: either "" or "socks5h://127.0.0.1" depending on TOR use.
CURLOPT_PROXYPORT: 0 or 9150
CURLOPT_HTTPPROXYTUNNEL: 0 or 1 (1 for TOR, 0 otherwise)
CURLOPT_TIMEOUT: 0
CURLOPT_CONNECTTIMEOUT: 0
CURLOPT_FOLLOWLOCATION: 0
CURLOPT_HTTP_VERSION: CURL_HTTP_VERSION_1_1
CURLOPT_SSLVERSION: CURL_SSLVERSION_MAX_TLSv1_2
CURLOPT_SSL_VERIFYPEER: 0
CURLOPT_SSL_VERIFYHOST: 0
CURLOPT_HTTPAUTH: CURLAUTH_NONE
CURLOPT_URL: "https://example.com" or similar
CURLOPT_HTTPGET: 1

-- MS

On 21/10/2020 17:42, Dan Fandrich via curl-library wrote:
> On Wed, Oct 21, 2020 at 03:50:00PM +0100, MS via curl-library wrote:
>> Gisle: thank you for your response.
>>
>>
>> Let's focus on the different behaviour with IPv4:
>>
>> Using libcurl in an application, without firewall
>> operating, attempting to connect to bbc.co.uk,
>> I obtain a hang with
>>
>> *   Trying 151.101.64.81:80...
>>
>> the only output written.
>>
>> Using curl.exe I obtain
>>
>>> curl -v -4 bbc.co.uk
>> *   Trying 151.101.64.81:80...
>> * Connected to bbc.co.uk (151.101.64.81) port 80 (#0)
>>> GET / HTTP/1.1
>>> Host: bbc.co.uk
>>> User-Agent: curl/7.71.0-DEV
>> I only have one dll in the system, which I have verified
>> both applications are loading.
>>
>> How could I investigate the reason for the difference
>> in behaviour? It can't fundamentally be ISP related,
>> since curl.exe gets through.
>>
>> With thanks again for any ideas!
> The application could be setting all kinds of options that prevent a transfer
> from succeeding or preventing log messages from being generated. Can you show
> us the failing code?
>
> -------------------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html


-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2020-10-22