Skip to content
This repository has been archived by the owner on Jan 29, 2023. It is now read-only.

Commit

Permalink
v1.7.2 to fix wrong http status header
Browse files Browse the repository at this point in the history
### Releases v1.7.2

1. Fix wrong http status header bug. Check [fix for wrong http status header #42](khoih-prog/EthernetWebServer#42)
2. Fix authenticate issue caused by libb64
  • Loading branch information
khoih-prog authored Dec 28, 2021
1 parent 3876d00 commit 3be833c
Show file tree
Hide file tree
Showing 26 changed files with 88 additions and 75 deletions.
3 changes: 2 additions & 1 deletion src/EthernetHttpClient_SSL.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

// Library to simplify HTTP fetching on Arduino
Expand Down
13 changes: 9 additions & 4 deletions src/EthernetWebServer_SSL-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,13 +26,14 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

#pragma once

#include <Arduino.h>
#include <libb64/cencode.h>
//#include "EthernetWebServer_SSL.h"
#include "EthernetWebServer_SSL.h"
#include "detail/RequestHandlersImpl.h"
#include "detail/Debug.h"
#include "detail/mimetable.h"
Expand Down Expand Up @@ -421,10 +422,12 @@ void EthernetWebServer::_prepareHeader(String& response, int code, const char* c
EWString aResponse = fromString(response);

aResponse = "HTTP/1." + fromString(String(_currentVersion)) + " ";
aResponse += code;
aResponse += fromString(String(code));
aResponse += " ";
aResponse += fromString(_responseCodeToString(code));
aResponse += RETURN_NEWLINE;

ET_LOGDEBUG1(F("_prepareHeader aResponse ="), fromEWString(aResponse));

using namespace mime;

Expand Down Expand Up @@ -465,10 +468,12 @@ void EthernetWebServer::_prepareHeader(String& response, int code, const char* c
void EthernetWebServer::_prepareHeader(EWString& response, int code, const char* content_type, size_t contentLength)
{
response = "HTTP/1." + fromString(String(_currentVersion)) + " ";
response += code;
response += fromString(String(code));
response += " ";
response += fromString(_responseCodeToString(code));
response += RETURN_NEWLINE;

ET_LOGDEBUG1(F("_prepareHeader response ="), fromEWString(response));

using namespace mime;

Expand Down
9 changes: 5 additions & 4 deletions src/EthernetWebServer_SSL.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,17 +26,18 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

#pragma once

#define ETHERNET_WEBSERVER_SSL_VERSION "EthernetWebServer_SSL v1.7.1"
#define ETHERNET_WEBSERVER_SSL_VERSION "EthernetWebServer_SSL v1.7.2"

#define ETHERNET_WEBSERVER_SSL_VERSION_MAJOR 1
#define ETHERNET_WEBSERVER_SSL_VERSION_MINOR 7
#define ETHERNET_WEBSERVER_SSL_VERSION_PATCH 1
#define ETHERNET_WEBSERVER_SSL_VERSION_PATCH 2

#define ETHERNET_WEBSERVER_SSL_VERSION_INT 1007001
#define ETHERNET_WEBSERVER_SSL_VERSION_INT 1007002

#define USE_NEW_WEBSERVER_VERSION true

Expand Down
3 changes: 2 additions & 1 deletion src/EthernetWrapper_SSL.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/
#pragma once

Expand Down
3 changes: 2 additions & 1 deletion src/Ethernet_HTTPClient/Ethernet_HttpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

// Class to simplify HTTP fetching on Arduino
Expand Down
3 changes: 2 additions & 1 deletion src/Ethernet_HTTPClient/Ethernet_HttpClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

// Class to simplify HTTP fetching on Arduino
Expand Down
3 changes: 2 additions & 1 deletion src/Ethernet_HTTPClient/Ethernet_URLEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

// Library to simplify HTTP fetching on Arduino
Expand Down
3 changes: 2 additions & 1 deletion src/Ethernet_HTTPClient/Ethernet_URLEncoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

// Library to simplify HTTP fetching on Arduino
Expand Down
3 changes: 2 additions & 1 deletion src/Ethernet_HTTPClient/Ethernet_WebSocketClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

// (c) Copyright Arduino. 2016
Expand Down
3 changes: 2 additions & 1 deletion src/Ethernet_HTTPClient/Ethernet_WebSocketClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

// (c) Copyright Arduino. 2016
Expand Down
3 changes: 2 additions & 1 deletion src/Parsing_SSL-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/
#pragma once

Expand Down
3 changes: 2 additions & 1 deletion src/detail/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

#pragma once
Expand Down
3 changes: 2 additions & 1 deletion src/detail/ESP_RequestHandlersImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

#pragma once
Expand Down
3 changes: 2 additions & 1 deletion src/detail/RequestHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

#pragma once
Expand Down
3 changes: 2 additions & 1 deletion src/detail/RequestHandlersImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

#pragma once
Expand Down
3 changes: 2 additions & 1 deletion src/detail/esp_detail/mimetable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

#if (ESP32 || ESP8266)
Expand Down
3 changes: 2 additions & 1 deletion src/detail/esp_detail/mimetable.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

#pragma once
Expand Down
3 changes: 2 additions & 1 deletion src/detail/mimetable.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -26,6 +26,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

#pragma once
Expand Down
3 changes: 2 additions & 1 deletion src/inner.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -25,6 +25,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug and authenticate issue caused by libb64
*************************************************************************************************************************************/

#include "SSLClient/inner.h"
Expand Down
3 changes: 2 additions & 1 deletion src/libb64/base64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
Built by Khoi Hoang https://github.com/khoih-prog/EthernetWebServer_SSL
Licensed under MIT license
Version: 1.7.1
Version: 1.7.2
Version Modified By Date Comments
------- ----------- ---------- -----------
Expand All @@ -25,6 +25,7 @@
1.6.1 K Hoang 04/10/2021 Change option for PIO `lib_compat_mode` from default `soft` to `strict`. Update Packages Patches
1.7.0 K Hoang 19/12/2021 Reduce usage of Arduino String with std::string. Add support to Portenta H7 Ethernet
1.7.1 K Hoang 25/12/2021 Fix bug relating to String
1.7.2 K Hoang 27/12/2021 Fix wrong http status header bug
*************************************************************************************************************************************/

#include "base64.h"
Expand Down
Loading

0 comments on commit 3be833c

Please sign in to comment.