@@ -1125,12 +1125,12 @@ static int s_aws_http_client_connect_via_tunneling_proxy(
1125
1125
1126
1126
static enum aws_http_proxy_connection_type s_determine_proxy_connection_type (
1127
1127
enum aws_http_proxy_connection_type proxy_connection_type ,
1128
- const struct aws_tls_connection_options * tls_options ) {
1128
+ bool is_tls_connection ) {
1129
1129
if (proxy_connection_type != AWS_HPCT_HTTP_LEGACY ) {
1130
1130
return proxy_connection_type ;
1131
1131
}
1132
1132
1133
- if (tls_options != NULL ) {
1133
+ if (is_tls_connection ) {
1134
1134
return AWS_HPCT_HTTP_TUNNEL ;
1135
1135
} else {
1136
1136
return AWS_HPCT_HTTP_FORWARD ;
@@ -1184,7 +1184,7 @@ static int s_connect_proxy(const struct aws_http_client_connection_options *opti
1184
1184
}
1185
1185
1186
1186
enum aws_http_proxy_connection_type proxy_connection_type =
1187
- s_determine_proxy_connection_type (options -> proxy_options -> connection_type , options -> tls_options );
1187
+ s_determine_proxy_connection_type (options -> proxy_options -> connection_type , options -> tls_options != NULL );
1188
1188
1189
1189
switch (proxy_connection_type ) {
1190
1190
case AWS_HPCT_HTTP_FORWARD :
@@ -1398,7 +1398,7 @@ struct aws_http_proxy_config *aws_http_proxy_config_new_from_connection_options(
1398
1398
return s_aws_http_proxy_config_new (
1399
1399
allocator ,
1400
1400
options -> proxy_options ,
1401
- s_determine_proxy_connection_type (options -> proxy_options -> connection_type , options -> tls_options ));
1401
+ s_determine_proxy_connection_type (options -> proxy_options -> connection_type , options -> tls_options != NULL ));
1402
1402
}
1403
1403
1404
1404
struct aws_http_proxy_config * aws_http_proxy_config_new_from_manager_options (
@@ -1410,7 +1410,8 @@ struct aws_http_proxy_config *aws_http_proxy_config_new_from_manager_options(
1410
1410
return s_aws_http_proxy_config_new (
1411
1411
allocator ,
1412
1412
options -> proxy_options ,
1413
- s_determine_proxy_connection_type (options -> proxy_options -> connection_type , options -> tls_connection_options ));
1413
+ s_determine_proxy_connection_type (
1414
+ options -> proxy_options -> connection_type , options -> tls_connection_options != NULL ));
1414
1415
}
1415
1416
1416
1417
struct aws_http_proxy_config * aws_http_proxy_config_new_tunneling_from_proxy_options (
@@ -1431,6 +1432,16 @@ struct aws_http_proxy_config *aws_http_proxy_config_new_from_proxy_options(
1431
1432
return s_aws_http_proxy_config_new (allocator , proxy_options , proxy_options -> connection_type );
1432
1433
}
1433
1434
1435
+ struct aws_http_proxy_config * aws_http_proxy_config_new_from_proxy_options_with_tls_info (
1436
+ struct aws_allocator * allocator ,
1437
+ const struct aws_http_proxy_options * proxy_options ,
1438
+ bool is_tls_connection ) {
1439
+ AWS_FATAL_ASSERT (proxy_options != NULL );
1440
+
1441
+ return s_aws_http_proxy_config_new (
1442
+ allocator , proxy_options , s_determine_proxy_connection_type (proxy_options -> connection_type , is_tls_connection ));
1443
+ }
1444
+
1434
1445
struct aws_http_proxy_config * aws_http_proxy_config_new_clone (
1435
1446
struct aws_allocator * allocator ,
1436
1447
const struct aws_http_proxy_config * proxy_config ) {
0 commit comments