Re: libcurl hang (v2)

2020-10-21 Thread MS via curl-library


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

alt-svc: enable by default

2020-10-21 Thread Daniel Stenberg via curl-library

Hello,

Yes, it's time for a final review and chance to comment on this before I 
merge!


https://github.com/curl/curl/pull/5868

--

 / daniel.haxx.se
 | Commercial curl support up to 24x7 is available!
 | Private help, bug fixes, support, ports, new features
 | https://www.wolfssl.com/contact/
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Re: libcurl hang (v2)

2020-10-21 Thread Dan Fandrich via curl-library
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

libcurl hang (v2)

2020-10-21 Thread MS via curl-library


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!

-- MS


---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Re: libcurl hang

2020-10-21 Thread Gisle Vanem via curl-library

MS wrote:


1)
Using libcurl without a proxy, the verbose options shows "Trying ip address" 
and nothing else.
If restricted to IPv4 it shows only one line. If IPv6 is permitted, I get a 
first response that network
is not reachable and then a second response "Trying ..." which hangs.


Some issue with your ISP and IPv6. A 6to4 solution or
a native-IPv6? What if you do 'tracert.exe -6 2a04:4e42:200::81'

I'm on Win-10 and it shows 8 hop to Holland. When I had a
6to4 solution from Telenor, most of my IPv6 traffic went
via Los Angeles!


 >curl -v bbc.co.uk
*   Trying 2a04:4e42:600::81:80...
* connect to 2a04:4e42:600::81 port 80 failed: Network unreachable
*   Trying 2a04:4e42::81:80...
* connect to 2a04:4e42::81 port 80 failed: Network unreachable
*   Trying 2a04:4e42:400::81:80...
* connect to 2a04:4e42:400::81 port 80 failed: Network unreachable
*   Trying 2a04:4e42:200::81:80...
* connect to 2a04:4e42:200::81 port 80 failed: Network unreachable
*   Trying 151.101.64.81:80...
* Connected to bbc.co.uk (151.101.64.81) port 80 (#0)


All these addresses are part of FASTLY's net.
Check at https://status.fastly.com.

---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

libcurl hang

2020-10-21 Thread MS via curl-library


I have a hang that I am attempting to resolve.


1)
Using libcurl without a proxy, the verbose options shows "Trying ip 
address" and nothing else.
If restricted to IPv4 it shows only one line. If IPv6 is permitted, I 
get a first response that network

is not reachable and then a second response "Trying ..." which hangs.

For example for trying bbc.co.uk with IPv4 yields   "*   Trying 
151.101.64.81:PORT..."

where PORT is 80 or 443, depending on http:// or https://.

With IPv6 enabled I get, for example,

*   Trying 2a04:4e42:200::81:80...
* connect to 2a04:4e42:200::81 port 80 failed: Network unreachable
*   Trying 2a04:4e42::81:80...


2)
If I make libcurl use TOR as a socks5h proxy, I get through:

* SOCKS5 connect to bbc.co.uk:443 (remotely resolved)
* SOCKS5 request granted.
* Connected to 127.0.0.1 (127.0.0.1) port 9150 (#0)


3)
If I use curl.exe with no proxy, I do get through:

>curl -v bbc.co.uk
*   Trying 2a04:4e42:600::81:80...
* connect to 2a04:4e42:600::81 port 80 failed: Network unreachable
*   Trying 2a04:4e42::81:80...
* connect to 2a04:4e42::81 port 80 failed: Network unreachable
*   Trying 2a04:4e42:400::81:80...
* connect to 2a04:4e42:400::81 port 80 failed: Network unreachable
*   Trying 2a04:4e42:200::81:80...
* connect to 2a04:4e42:200::81 port 80 failed: Network unreachable
*   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


4)
The hang appears to not be firewall related, since it occurs even
with the firewall switched off (and the application using libcurl
is present in the firewall whitelist.)


Any suggestions for how I can diagonse a bit further, or guesses
about what may be going on?

With thanks in advance,

-- MS


---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Re: Thoughts on HSTS

2020-10-21 Thread Daniel Stenberg via curl-library

On Mon, 14 Sep 2020, Daniel Stenberg via curl-library wrote:


 https://github.com/curl/curl/pull/5896


My thinking is to get this merged in the *next* feature window, thus probably 
in the 7.74.0 release.


The time has come. I will merge this "soon".

--

 / daniel.haxx.se
 | Commercial curl support up to 24x7 is available!
 | Private help, bug fixes, support, ports, new features
 | https://www.wolfssl.com/contact/
---
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html