mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-14 13:15:14 +03:00
GCC11 compitatibility fix.
HTTPStreamChunked fix. Respect https scheme on http_request example.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <eepp/core/utf.hpp>
|
||||
#include <functional>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
|
||||
namespace EE {
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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() );
|
||||
|
||||
Reference in New Issue
Block a user