esp8266 / esp8266/Arduino

HTTP_UPDATE_FAILD Error (-104): Wrong HTTP Code

Open
#6,971 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
13.1k
PR merge metrics
No merged PRs in 30d

Description

Hi All
I am using ESP8266 to test httpUpdate. Tried both of these update methods

```
//t_httpUpdate_return ret = ESPhttpUpdate.update(client, "http://rohini.ultimatefreehost.in/httpUpdate.bin"); -->Did not work

t_httpUpdate_return ret = ESPhttpUpdate.update(client, "http://rohini.ultimatefreehost.in", 80, "httpUpdate.bin"); ->> getting HTTP_UPDATE_FAILD Error (-104): Wrong HTTP Code
```
Debug messages
```
[SETUP] WAIT 1...
[WIFI][APlistAdd] add SSID: mySSID
[HTTP-Client][sendRequest] type: 'GET' redirCount: 0
[hostByName] request IP for: http://rohini.ultimatefreehost.in
[hostByName] Host: http://rohini.ultimatefreehost.in IP: 199.59.242.153
:ref 1
[HTTP-Client] connected to http://rohini.ultimatefreehost.in:80
[HTTP-Client] sending request header
-----
GET httpUpdate.bin HTTP/1.0
Host: http://rohini.ultimatefreehost.in
User-Agent: ESP8266-http-Update
Connection: close
x-ESP8266-Chip-ID: 7223731
x-ESP8266-STA-MAC: 80:7D:3A:6E:39:B3
x-ESP8266-AP-MAC: 82:7D:3A:6E:39:B3
x-ESP8266-free-space: 1781760
x-ESP8266-sketch-size: 312832
x-ESP8266-sketch-md5: 54acdd6530aed0cfb5679d4daa83348c
x-ESP8266-chip-size: 4194304
x-ESP8266-sdk-version: 2.2.2-dev(38a443e)
x-ESP8266-mode: sketch
Content-Length: 0

-----
:wr 461 0
:wrc 461 461 0
:ack 461
:rn 319
:rcl
:abort
[HTTP-Client][handleHeaderResponse] RX: 'HTTP/1.1 400 Bad Request'
[HTTP-Client][handleHeaderResponse] RX: 'Server: openresty'
[HTTP-Client][handleHeaderResponse] RX: 'Date: Wed, 01 Jan 2020 06:14:18 GMT'
[HTTP-Client][handleHeaderResponse] RX: 'Content-Type: text/html'
[HTTP-Client][handleHeaderResponse] RX: 'Content-Length: 170'
[HTTP-Client][handleHeaderResponse] RX: 'Connection: close'
[HTTP-Client][handleHeaderResponse] RX: ''
[HTTP-Client][handleHeaderResponse] code: 400
[HTTP-Client][handleHeaderResponse] size: 170
[httpUpdate] Header read fin.
[httpUpdate] Server header:
[httpUpdate] - code: 400
[httpUpdate] - len: 170
[httpUpdate] ESP8266 info:
[httpUpdate] - free Space: 1781760
[httpUpdate] - current Sketch Size: 312832
CALLBACK: HTTP update fatal error code -104
[httpUpdate] HTTP Code is (400)
[HTTP-Client][end] still data in buffer (170), clean up.
:c0 1, 319
[HTTP-Client][end] tcp stop
HTTP_UPDATE_FAILD Error (-104): Wrong HTTP Code
:ur 1
:del
```

I have placed httpUpdate.bin under to root .

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.