@@ -405,8 +405,9 @@ static struct aws_http_message *s_create_session_request_new(
405405 .name = g_host_header_name ,
406406 .value = host_value ,
407407 };
408-
409- /* NOTE: ONLY FOR TESTS. Don't add the host header for endpoint override. */
408+ /* NOTE: Only for Tests.
409+ * Don't add the host header for endpoint override.
410+ */
410411 if (endpoint_override == NULL ) {
411412 if (aws_http_message_add_header (request , host_header )) {
412413 goto error ;
@@ -443,7 +444,10 @@ static struct aws_http_message *s_create_session_request_new(
443444 struct aws_byte_cursor path_and_query = s_create_session_path_query ;
444445 if (endpoint_override != NULL ) {
445446 const struct aws_byte_cursor * override_path_query = aws_uri_path_and_query (endpoint_override );
446- if (override_path_query -> len > 0 ) {
447+ /* NOTE: Only for Tests.
448+ * path_and_query is at least 1 due to /. Only override if its length is more than 1
449+ */
450+ if (override_path_query -> len > 1 ) {
447451 path_and_query = * override_path_query ;
448452 }
449453 }
@@ -486,7 +490,7 @@ struct aws_string *aws_encode_s3express_hash_key_new(
486490 const struct aws_credentials * original_credentials ,
487491 struct aws_byte_cursor host_value ,
488492 struct aws_http_headers * headers ) {
489- ( void ) headers ;
493+
490494 struct aws_byte_buf combined_hash_buf ;
491495
492496 /* 1. Combine access_key and secret_access_key into one buffer */
0 commit comments