Skip to content

Commit 1559a3b

Browse files
Fix HTTPUpdate templates and examples
1 parent 786c583 commit 1559a3b

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

libraries/ESP8266HTTPUpdateServer/examples/SecureBearSSLUpdater/SecureBearSSLUpdater.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void setup()
106106

107107
MDNS.begin(host);
108108

109-
httpServer.setRSACert(new BearSSL::X509List(serverCert), new BearSSL::PrivateKey(serverKey));
109+
httpServer.getServer().setRSACert(new BearSSL::X509List(serverCert), new BearSSL::PrivateKey(serverKey));
110110
httpUpdater.setup(&httpServer, update_path, update_username, update_password);
111111
httpServer.begin();
112112

libraries/ESP8266HTTPUpdateServer/examples/SecureHTTPSUpdater/SecureHTTPSUpdater.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ void setup() {
176176

177177
MDNS.begin(host);
178178

179-
httpServer.setServerKeyAndCert_P(rsakey, sizeof(rsakey), x509, sizeof(x509));
179+
httpServer.getServer().setServerKeyAndCert_P(rsakey, sizeof(rsakey), x509, sizeof(x509));
180180
httpUpdater.setup(&httpServer, update_path, update_username, update_password);
181181
httpServer.begin();
182182

libraries/ESP8266HTTPUpdateServer/src/ESP8266HTTPUpdateServer-impl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ static const char successResponse[] PROGMEM =
1717
"<META http-equiv=\"refresh\" content=\"15;URL=/\">Update Success! Rebooting...\n";
1818

1919
template <typename ServerType, typename ClientType>
20-
ESP8266HTTPUpdateServerTemplate<ServerType, ClientType>::ESP8266HTTPUpdateServer(bool serial_debug)
20+
ESP8266HTTPUpdateServerTemplate<ServerType, ClientType>::ESP8266HTTPUpdateServerTemplate(bool serial_debug)
2121
{
2222
_serial_output = serial_debug;
2323
_server = NULL;

libraries/ESP8266HTTPUpdateServer/src/ESP8266HTTPUpdateServer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <ESP8266WebServer.h>
55

6-
temnplate <typename ServerType, typename ClientType>
6+
template <typename ServerType, typename ClientType>
77
class ESP8266HTTPUpdateServerTemplate
88
{
99
public:

libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ void ESP8266WebServerTemplate<ServerType, ClientType>::send_P(int code, PGM_P co
441441
char type[64];
442442
memccpy_P((void*)type, (PGM_VOID_P)content_type, 0, sizeof(type));
443443
_prepareHeader(header, code, (const char* )type, contentLength);
444-
_currentClient.write(header.c_str(), header.length());
444+
_currentClient.write((const uint8_t *)header.c_str(), header.length());
445445
if (contentLength) {
446446
sendContent_P(content);
447447
}
@@ -496,11 +496,11 @@ void ESP8266WebServerTemplate<ServerType, ClientType>::sendContent_P(PGM_P conte
496496
if(_chunked) {
497497
char chunkSize[11];
498498
sprintf(chunkSize, "%zx\r\n", size);
499-
_currentClient.write(chunkSize, strlen(chunkSize));
499+
_currentClient.write((const uint8_t *)chunkSize, strlen(chunkSize));
500500
}
501501
_currentClient.write_P(content, size);
502502
if(_chunked){
503-
_currentClient.write(footer, 2);
503+
_currentClient.write((const uint8_t *)footer, 2);
504504
if (size == 0) {
505505
_chunked = false;
506506
}

0 commit comments

Comments
 (0)