From 6fb24fe91869f27aa68b01f9331f14a09b7df042 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sat, 3 Jul 2021 13:13:35 -0300 Subject: [PATCH] GCC11 compitatibility fix. HTTPStreamChunked fix. Respect https scheme on http_request example. --- src/eepp/core/string.cpp | 1 + src/eepp/network/http/httpstreamchunked.cpp | 2 +- src/examples/http_request/http_request.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/eepp/core/string.cpp b/src/eepp/core/string.cpp index f064d2cc9..2958d4117 100644 --- a/src/eepp/core/string.cpp +++ b/src/eepp/core/string.cpp @@ -6,6 +6,7 @@ #include #include #include +#include namespace EE { diff --git a/src/eepp/network/http/httpstreamchunked.cpp b/src/eepp/network/http/httpstreamchunked.cpp index 8239916f8..bcc10d4ba 100644 --- a/src/eepp/network/http/httpstreamchunked.cpp +++ b/src/eepp/network/http/httpstreamchunked.cpp @@ -31,7 +31,7 @@ ios_size HttpStreamChunked::write( const char* data, ios_size size ) { retry = false; // Check for the first \r\n to find the end of the length definition - std::string::size_type lenEnd = mChunkBuffer.find_first_of( "\r\n" ); + std::string::size_type lenEnd = mChunkBuffer.find( "\r\n" ); if ( lenEnd != std::string::npos ) { std::string::size_type firstCharPos = lenEnd + 2; diff --git a/src/examples/http_request/http_request.cpp b/src/examples/http_request/http_request.cpp index 057646859..70e0f864b 100644 --- a/src/examples/http_request/http_request.cpp +++ b/src/examples/http_request/http_request.cpp @@ -84,7 +84,7 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) { } // Set the host and port from the URI - http.setHost( uri.getHost(), uri.getPort() ); + http.setHost( uri.getHost(), uri.getPort(), uri.getScheme() == "https" ); // Set the path and query parts for the request request.setUri( uri.getPathEtc() );