File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,14 @@ struct aws_http_connection_manager_options {
59
59
struct aws_client_bootstrap * bootstrap ;
60
60
size_t initial_window_size ;
61
61
const struct aws_socket_options * socket_options ;
62
+ /**
63
+ * Optional (ignored if 0).
64
+ * After a request is fully sent, if the server does not begin responding within N milliseconds,
65
+ * then fail with AWS_ERROR_HTTP_RESPONSE_FIRST_BYTE_TIMEOUT.
66
+ * This can be overridden per-request by aws_http_make_request_options.response_first_byte_timeout_ms.
67
+ * TODO: Only supported in HTTP/1.1 now, support it in HTTP/2
68
+ */
69
+ uint64_t response_first_byte_timeout_ms ;
62
70
63
71
/**
64
72
* Options to create secure (HTTPS) connections.
Original file line number Diff line number Diff line change @@ -240,6 +240,8 @@ struct aws_http_connection_manager {
240
240
struct proxy_env_var_settings proxy_ev_settings ;
241
241
struct aws_tls_connection_options * proxy_ev_tls_options ;
242
242
uint32_t port ;
243
+ uint64_t response_first_byte_timeout_ms ;
244
+
243
245
/*
244
246
* HTTP/2 specific.
245
247
*/
@@ -958,6 +960,7 @@ struct aws_http_connection_manager *aws_http_connection_manager_new(
958
960
manager -> max_connection_idle_in_milliseconds = options -> max_connection_idle_in_milliseconds ;
959
961
manager -> connection_acquisition_timeout_ms = options -> connection_acquisition_timeout_ms ;
960
962
manager -> max_pending_connection_acquisitions = options -> max_pending_connection_acquisitions ;
963
+ manager -> response_first_byte_timeout_ms = options -> response_first_byte_timeout_ms ;
961
964
962
965
if (options -> proxy_ev_settings ) {
963
966
manager -> proxy_ev_settings = * options -> proxy_ev_settings ;
@@ -1090,6 +1093,7 @@ static int s_aws_http_connection_manager_new_connection(struct aws_http_connecti
1090
1093
options .host_name = aws_byte_cursor_from_string (manager -> host );
1091
1094
options .port = manager -> port ;
1092
1095
options .initial_window_size = manager -> initial_window_size ;
1096
+ options .response_first_byte_timeout_ms = manager -> response_first_byte_timeout_ms ;
1093
1097
struct aws_socket_options socket_options = manager -> socket_options ;
1094
1098
if (aws_array_list_length (& manager -> network_interface_names )) {
1095
1099
struct aws_string * interface_name = NULL ;
You can’t perform that action at this time.
0 commit comments