esp8266 / Arduino

ESP8266 core for Arduino
GNU Lesser General Public License v2.1
16.07k stars 13.33k forks source link

ESPhttpUpdate.update support for x-amz-meta-s3-MD5 header in addition to x-MD5 #3841

Open mahees opened 6 years ago

mahees commented 6 years ago

Hi there,

im using Amazon AWS S3 to host the bin file for the http ota update. S3 is a simple http fileserver meant for hosting files. (Amazon S3 provides storage through web services interfaces). Im working on an approach which requires ESPhttpUpdate.update to call s3 directly for the update binary.

image

However, im getting HTTP_UPDATE_FAILD Error (-106): Verify bin header failed error. Because im not sending the x-MD5 header.

I did some research and unfortunately custom headers such as x-MD5 are not supported, however, fortunately s3 does support custom headers with the pattern x-amz-meta-* and a value to files served by s3.

image

image

I am not a cpp dev. Ive mocked up some code, i hope someone can help me test and merge this.

https://github.com/esp8266/Arduino/commit/95c8152d26ae245ba89d27272852722e872e831c

Any assistance will be appreciated.

Thanks in advance.

jlujan-na commented 6 years ago

Commented in the previous thread.

https://github.com/esp8266/Arduino/issues/3811#issuecomment-346139356