Requests and Answers Encoding

When requests answer is from (atleast) ISO-8859-1, the module take so long for process the response.

## Expected Result
Similar time than curl or browser time around 1 sec 

## Actual Result
The answer takes more than 2 minutes
![image](https://user-images.githubusercontent.com/30806958/96336246-ae3ba400-107e-11eb-803d-4e3489d42c6f.png)
## Reproduction Steps

```
url = 'https://geoportal.minetur.gob.es/VCTEL/infoantenasGeoJSON.do?idCapa=null&bbox=-1.5525697885398,39.26519497205,-1.549179476345,39.273649294864&zoom=4'
r = requests.get(url, headers=headers)
print(r.json())

```

## System Information

    $ python -m requests.help

```
{
  "chardet": {
    "version": "3.0.4"
  },
  "cryptography": {
    "version": ""
  },
  "idna": {
    "version": "2.10"
  },
  "implementation": {
    "name": "CPython",
    "version": "3.8.5"
  },
  "platform": {
    "release": "5.4.64-1-MANJARO",
    "system": "Linux"
  },
  "pyOpenSSL": {
    "openssl_version": "",
    "version": null
  },
  "requests": {
    "version": "2.24.0"
  },
  "system_ssl": {
    "version": "1010107f"
  },
  "urllib3": {
    "version": "1.25.10"
  },
  "using_pyopenssl": false
}
```
## Thoughts

This looks like a problem with encoding as requests needs to guess the encoding, maybe adding a parameter or a way for specify the answer encoding would speed it up

> This looks like a problem with encoding as requests needs to guess the encoding, maybe adding a parameter or a way for specify the answer encoding would speed it up

Assuming this is accurate, `r.encoding` can be set to bypass `chardet`. This is well documented across issues and our documentation and stackoverflow. In the future, please search **closed and** open issues before creating new ones that are duplicates.

I can't recreate this locally because you've provided screenshots which are inaccessible and unsearchable. As such, I'm closing this issue based on your guess as to what's happening

In "Reproduction steps" you have a piece of code for test it the screenshot was only informative for see the times, if you prefer another format only tell me.

For other side (correct me if im wrong) for set `r.encoding`, you need to have `r`, and that is what takes 2 minutes. Is there any way for avoid requests to guess the enconding?

The item that takes 2 minutes in your screenshot is `r = requests.get(...)` **and** `r.json()` which needs `r.text` which will fallback on `r.apparent_encoding`. So you can set `r.encoding` prior to `r.json()`. For what it's worth your code has `headers=headers` with no definition of headers. And two different networks often (if you'd searched old issues) will encounter different behaviours. 

You are right, the screenshot and the reproduction steps were not accurate and i missed remove the headers parameter.

Actually what need 2 minutes is only `requests.get(url)`

Therefore, a better "Reproduction steps" would be:

```
Import requests
url = 'https://geoportal.minetur.gob.es/VCTEL/infoantenasGeoJSON.do?idCapa=null&bbox=-1.5525697885398,39.26519497205,-1.549179476345,39.273649294864&zoom=4'
r = requests.get(url)

```

The `print(r.json())` was only for show that it worked. Hence the same question is on the air, why a simple get request takes 2 minutes when with curl is less than one second?



It returned immediately for me. 

```
>>> r = requests.get(url)
>>> r.elapsed
datetime.timedelta(microseconds=790330)
```

As I said different networks exhibit different behaviour. This isn't a strict behaviour of requests. 

Mmmm yes, if it is working on your side, must not be requests problem, but also as it is working correctly on curl cant be neither a network problem. Do you have any guess why this could be happening?

It can be a network problem. curl could be using a different DNS entry than requests. It could be a proxy or intemediary that inspects User-Agent headers and has different behaviour. There's too many possibilities and this is not a support forum, but a defect tracker