InputEvents improvements and some minor fixes and optimizations.

This commit is contained in:
Martín Lucas Golini
2020-02-19 02:07:03 -03:00
parent 48d0f06b2b
commit 73e9489f81
12 changed files with 187 additions and 49 deletions

View File

@@ -187,12 +187,19 @@ EE_MAIN_FUNC int main( int argc, char* argv[] ) {
// Set the proxy for the request
char* http_proxy = getenv( "http_proxy" );
std::string httpProxy;
if ( !proxy && NULL != http_proxy ) {
http.setProxy( URI( http_proxy ) );
httpProxy = std::string( http_proxy );
} else if ( proxy ) {
http.setProxy( URI( proxy.Get() ) );
httpProxy = proxy.Get();
}
if ( httpProxy.find( "://" ) == std::string::npos ) {
httpProxy = "http://" + httpProxy;
}
http.setProxy( URI( httpProxy ) );
// Request a compressed response
if ( compressed ) {
request.setCompressedResponse( true );