Open ThingEngineer opened 1 year ago
http.useHTTP10()
has to do with HTTP encoding (HTTP Header Accept-Encoding) and not with security.
It is the content encoding (usually a compression algorithm) that the client can understand.
By default it is false
and therefore, it uses Accept-Encoding: identity
, which means without modification or compression.
I worry that this may be breaking the server verification similar to setInsecure(). I worry that this may be breaking the server verification similar to setInsecure().
If commenting it out makes the application work fine, you can go with it.
Board
ESP23-CAM
Device Description
Plain ESP23-CAM on an ESP32-CAM-MB connected to Mac with a 3.3' USB C to Micro USB cable. Two Dallas DS18B20 temperature sensors are connected via DuPont cables plugged into extra headers soldered onto the ESP32-CAM-MB.
Hardware Configuration
The ONE_WIRE_BUS for Dallas comms is on GPIO 2.
Version
latest master (checkout manually)
IDE Name
PlatformIO
Operating System
macOS 10.15.7
Flash frequency
40MHz
PSRAM enabled
yes
Upload speed
921600
Description
Calling httpUpdate.update() produces the debug message/error below. The version check and update DO proceed despite the error. If I comment http.useHTTP10(true); on line 189 of HTTPUpdate.cpp this error is no longer thrown.
I worry that this may be breaking the server verification similar to setInsecure(). All other secure https GET/POST requests and responses work without error.
My firmware update server is reverse proxied via Cloudflare with the encryption mode set to Full (strict) which encrypts end-to-end, but requires a trusted CA or Cloudflare Origin CA certificate on the server. I used the generated Cloudflare Origin Certificate on the server. On Cloudflare I have the minimum TLS version set to 1.2, HSTS enabled, Opportunistic Encryption enabled, TLS 1.3 enabled, and Automatic HTTPS Rewrites enabled.
It seems the https proxy is not HTTP/1.0 compliant, but requires HTTP/1.1.
It would be nice to have a real fix for this but an arg to disable forcing HTTP/1.0 seems that it would satisfy the issue.
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide