When connecting using transportTraits, the CA and client certificates are ignored after the initial _client->connect() is called. This is because on connect, WiFiClientSecure will call start_ssl_client with _CA_Cert and other cert options set to null unless setCACert, setCertificate etc. are called before connect. Running _transportTraits->verify after connect therefore does exactly nothing. It's easy to verify that this is the case by passing a CACert to HTTPClient with verbose logging enabled - the logs will say "WARNING: Use certificates for a more secure communication!" which is only present when both PSK and CA are null. This change fixes the issue.
If two headers with overlapping names are added while replace == true, like in:
```cpp
http.addHeader("api_token", "pMXFOLpinQqajaRQJYMeWObg2XYmcX1");
http.addHeader("token", "1234");
```
then replacing went wrong. This is fixed with this PR.
* Fix persistance issue found, see ESP8266 issue #6152
* Correcting the parsing of the header for HTTP1.0
* Send 'Connection: Close' header in case of HTTP1.0
* Let reuse connection depend on protocol used: HTTP1.0 or HTTP1.1
* Fixed reuse, added null ptr checks, added check for _trainsportTraits in connect() in case _client was set null
* Fix reuse connection issues, similar to ESP8266 PR #6176
* Pass client parameter into two new begin() functions. Set other begin() functions deprecated. Updated library version to 1.2
* Added working HTTPS example on a public url with a certificate
* Remove two unnecessary tests in ::disconnect()
* Add a scoping block to BasicHttpsClient.ino to assure HTTPClient is destroyed before WiFiClientSecure
* Added check to handle mixup of old and present api properly
* Correct HTTPClient::setTimeout() to convert milliseconds to seconds. Correct WiFiClient::setTimeout() to call Stream::setTimeout() with seconds converted back to milliseconds. Remove inproper checks for _insecure.
* Added small comment because it looked like the Travis build did not finish
* Fix possible infinite loop in the example
* Remove workaround of sockets always return -76
Remove workaround of sockets always return -76 (because it's fixed on IDF now)
Remove delay during handshake (improving stability)
* Remove unusable mbedtls_net of context creation
* Fix bad destructor
* Compatibility with WiFiClient for HTTPClient
* Initial port from ESP8266
Changed SHA1 fingerprint by Root CA verification
Changed log system
* Remove deprecated function