curl / Mailing Lists / curl-library / Single Mail
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: Recv failure error under censorship conditions

From: Henrik Holst via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 15 Jul 2021 15:07:48 +0200

As your own research shows they are most definitely filtering based on
user-agent. Probably done in order to filter out access from various mobile
phone apps.

There could of course be other types of filters as well but your example
clearly demonstrates the presence of a user-agent filter for web browsing.
I assume that https is blocked completely?

/HH

Den tors 15 juli 2021 kl 15:00 skrev Gealber Morales via curl-library <
curl-library_at_cool.haxx.se>:

> Hello there
>
> Before I start to describe the technical problem that I have I should
> clarify that I don't think this is a problem of cURL, but is related to it,
> and maybe you know the reason of the error. In case is not related to cURL,
> you could tell me I would understand. Ok, let me describe the problem that
> I'm facing, first I live in Cuba. Due to the events of July 11, the
> government limited the usage of mobile data to zero, literally zero. Until
> yesterday, that they enable it again, but with a lot of restrictions, for
> example you couldn't access any social network without a VPN. Now in some
> way this seems to be affecting the use of cURL, and it would be nice to
> know what could be some possible cause of this. Before these limitations, I
> could use cURL without any problem, so again is not a cURL problem, but I
> found it interesting what is happening. Behavior that is happening right
> now, when I try to make a `HEAD` request to google or any other website,
> I've tried with literally 7 websites, I get this message:
>
> ```
> curl -I google.com
> curl: (56) Recv failure: Conexión reinicializada por la máquina remota
> ```
> The curious thing is that I can access google from the browser, and I
> tried another thing, I made the same request changing the `User-Agent` to
> simulate the request of a browser:
>
> ```
> curl -I -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64)
> AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36"
> google.com
>
> HTTP/1.1 301 Moved Permanently
> Location: http://www.google.com/
> Content-Type: text/html; charset=UTF-8
> BFCache-Opt-In: unload
> Date: Thu, 15 Jul 2021 12:49:40 GMT
> Expires: Sat, 14 Aug 2021 12:49:40 GMT
> Cache-Control: public, max-age=2592000
> Server: gws
> Content-Length: 219
> X-XSS-Protection: 0
> X-Frame-Options: SAMEORIGIN
> ```
> In this case, I get the expected response, which is a redirection.
>
> I imagine that they are blocking or making some filtering by `User-Agent`
> but not sure if it could be other reason, maybe you have an idea of what
> could be happening.
>
> Thanks in advance, and sorry if this is offtopic but I found it curious
> and is related to cURL in some way.
> -------------------------------------------------------------------
> Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette: https://curl.se/mail/etiquette.html


-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.se/mail/etiquette.html
Received on 2021-07-15