Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package aws-c-s3 for openSUSE:Factory 
checked in at 2025-05-14 17:01:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/aws-c-s3 (Old)
 and      /work/SRC/openSUSE:Factory/.aws-c-s3.new.30101 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "aws-c-s3"

Wed May 14 17:01:51 2025 rev:22 rq:1277351 version:0.7.17

Changes:
--------
--- /work/SRC/openSUSE:Factory/aws-c-s3/aws-c-s3.changes        2025-05-07 
19:21:09.858942028 +0200
+++ /work/SRC/openSUSE:Factory/.aws-c-s3.new.30101/aws-c-s3.changes     
2025-05-14 17:02:17.925979188 +0200
@@ -1,0 +2,6 @@
+Wed May  7 11:27:41 UTC 2025 - John Paul Adrian Glaubitz 
<adrian.glaub...@suse.com>
+
+- Update to version 0.7.17
+  * Default request without body by @TingDaoK in (#516)
+
+-------------------------------------------------------------------

Old:
----
  v0.7.16.tar.gz

New:
----
  v0.7.17.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ aws-c-s3.spec ++++++
--- /var/tmp/diff_new_pack.YDpfbh/_old  2025-05-14 17:02:19.558047528 +0200
+++ /var/tmp/diff_new_pack.YDpfbh/_new  2025-05-14 17:02:19.590048868 +0200
@@ -19,7 +19,7 @@
 %define library_version 1.0.0
 %define library_soversion 0unstable
 Name:           aws-c-s3
-Version:        0.7.16
+Version:        0.7.17
 Release:        0
 Summary:        AWS Cross-Platform, C99 wrapper for cryptography primitives
 License:        Apache-2.0

++++++ v0.7.16.tar.gz -> v0.7.17.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-c-s3-0.7.16/source/s3_client.c 
new/aws-c-s3-0.7.17/source/s3_client.c
--- old/aws-c-s3-0.7.16/source/s3_client.c      2025-04-29 18:11:55.000000000 
+0200
+++ new/aws-c-s3-0.7.17/source/s3_client.c      2025-05-07 02:48:23.000000000 
+0200
@@ -1236,7 +1236,7 @@
                                 client->allocator,
                                 client,
                                 AWS_S3_REQUEST_TYPE_GET_OBJECT,
-                                content_length,
+                                0, /* Content length for request */
                                 false /*should_compute_content_md5*/,
                                 options);
                         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-c-s3-0.7.16/source/s3_default_meta_request.c 
new/aws-c-s3-0.7.17/source/s3_default_meta_request.c
--- old/aws-c-s3-0.7.16/source/s3_default_meta_request.c        2025-04-29 
18:11:55.000000000 +0200
+++ new/aws-c-s3-0.7.17/source/s3_default_meta_request.c        2025-05-07 
02:48:23.000000000 +0200
@@ -329,6 +329,7 @@
 
     struct aws_s3_request *request = request_prep->request;
     struct aws_s3_meta_request *meta_request = request->meta_request;
+    struct aws_s3_meta_request_default *meta_request_default = 
meta_request->impl;
 
     if (error_code != AWS_ERROR_SUCCESS) {
         goto finish;
@@ -347,13 +348,17 @@
         struct aws_http_headers *headers = 
aws_http_message_get_headers(message);
         aws_http_headers_set(headers, g_request_validation_mode, g_enabled);
     }
-    aws_s3_message_util_assign_body(
-        meta_request->allocator,
-        &request->request_body,
-        message,
-        &meta_request->checksum_config,
-        NULL /* out_checksum */);
-
+    if (meta_request_default->request_type == AWS_S3_REQUEST_TYPE_PUT_OBJECT ||
+        meta_request_default->request_type == AWS_S3_REQUEST_TYPE_UPLOAD_PART 
|| request->request_body.len > 0) {
+        /* Only PUT Object and Upload part support trailing checksum, that 
needs the special encoding even if the body
+         * has 0 length. */
+        aws_s3_message_util_assign_body(
+            meta_request->allocator,
+            &request->request_body,
+            message,
+            &meta_request->checksum_config,
+            NULL /* out_checksum */);
+    }
     aws_s3_request_setup_send_data(request, message);
 
     aws_http_message_release(message);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-c-s3-0.7.16/tests/CMakeLists.txt 
new/aws-c-s3-0.7.17/tests/CMakeLists.txt
--- old/aws-c-s3-0.7.16/tests/CMakeLists.txt    2025-04-29 18:11:55.000000000 
+0200
+++ new/aws-c-s3-0.7.17/tests/CMakeLists.txt    2025-05-07 02:48:23.000000000 
+0200
@@ -176,6 +176,7 @@
 add_net_test_case(test_s3_round_trip_default_get)
 add_net_test_case(test_s3_round_trip_multipart_get_fc)
 add_net_test_case(test_s3_round_trip_default_get_fc)
+add_net_test_case(test_s3_round_trip_empty_fc)
 add_net_test_case(test_s3_round_trip_mpu_multipart_get_fc)
 add_net_test_case(test_s3_round_trip_mpu_multipart_get_with_list_algorithm_fc)
 add_net_test_case(test_s3_round_trip_mpu_default_get_fc)
@@ -401,6 +402,8 @@
 add_net_test_case(client_meta_request_override_part_size)
 add_net_test_case(client_meta_request_override_multipart_upload_threshold)
 
+add_net_test_case(test_s3_default_get_without_content_length)
+
 set(TEST_BINARY_NAME ${PROJECT_NAME}-tests)
 generate_test_driver(${TEST_BINARY_NAME})
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/aws-c-s3-0.7.16/tests/s3_data_plane_tests.c 
new/aws-c-s3-0.7.17/tests/s3_data_plane_tests.c
--- old/aws-c-s3-0.7.16/tests/s3_data_plane_tests.c     2025-04-29 
18:11:55.000000000 +0200
+++ new/aws-c-s3-0.7.17/tests/s3_data_plane_tests.c     2025-05-07 
02:48:23.000000000 +0200
@@ -3922,6 +3922,7 @@
     struct aws_allocator *allocator,
     void *ctx,
     bool via_header,
+    uint32_t object_size_mb,
     enum aws_s3_tester_full_object_checksum full_object_checksum) {
     (void)ctx;
 
@@ -3943,8 +3944,9 @@
         snprintf(
             object_path_sprintf_buffer,
             sizeof(object_path_sprintf_buffer),
-            "/prefix/round_trip/test_default_fc_%d.txt",
-            algorithm);
+            "/prefix/round_trip/test_default_fc_%d_%d.txt",
+            algorithm,
+            object_size_mb);
 
         ASSERT_SUCCESS(aws_s3_tester_upload_file_path_init(
             allocator, &path_buf, 
aws_byte_cursor_from_c_str(object_path_sprintf_buffer)));
@@ -3960,7 +3962,7 @@
             .checksum_via_header = via_header,
             .put_options =
                 {
-                    .object_size_mb = 1,
+                    .object_size_mb = object_size_mb,
                     .object_path_override = object_path,
                 },
         };
@@ -4000,18 +4002,22 @@
 
 AWS_TEST_CASE(test_s3_round_trip_default_get_fc, 
s_test_s3_round_trip_default_get_fc)
 static int s_test_s3_round_trip_default_get_fc(struct aws_allocator 
*allocator, void *ctx) {
-    return s_test_s3_round_trip_default_get_fc_helper(allocator, ctx, false, 
AWS_TEST_FOC_NONE);
+    return s_test_s3_round_trip_default_get_fc_helper(allocator, ctx, false, 1 
/*object_size_mb*/, AWS_TEST_FOC_NONE);
+}
+AWS_TEST_CASE(test_s3_round_trip_empty_fc, s_test_s3_round_trip_empty_fc)
+static int s_test_s3_round_trip_empty_fc(struct aws_allocator *allocator, void 
*ctx) {
+    return s_test_s3_round_trip_default_get_fc_helper(allocator, ctx, false, 
0, AWS_TEST_FOC_NONE);
 }
 
 AWS_TEST_CASE(test_s3_round_trip_default_get_fc_header, 
s_test_s3_round_trip_default_get_fc_header)
 static int s_test_s3_round_trip_default_get_fc_header(struct aws_allocator 
*allocator, void *ctx) {
-    return s_test_s3_round_trip_default_get_fc_helper(allocator, ctx, true, 
AWS_TEST_FOC_NONE);
+    return s_test_s3_round_trip_default_get_fc_helper(allocator, ctx, true, 1, 
AWS_TEST_FOC_NONE);
 }
 AWS_TEST_CASE(
     test_s3_round_trip_default_get_full_object_checksum_fc,
     s_test_s3_round_trip_default_get_full_object_checksum_fc)
 static int s_test_s3_round_trip_default_get_full_object_checksum_fc(struct 
aws_allocator *allocator, void *ctx) {
-    return s_test_s3_round_trip_default_get_fc_helper(allocator, ctx, false, 
AWS_TEST_FOC_HEADER);
+    return s_test_s3_round_trip_default_get_fc_helper(allocator, ctx, false, 
1, AWS_TEST_FOC_HEADER);
 }
 
 static int s_test_s3_round_trip_multipart_get_fc_helper(struct aws_allocator 
*allocator, void *ctx, bool via_header) {
@@ -8049,3 +8055,62 @@
     aws_s3_tester_clean_up(&tester);
     return 0;
 }
+
+static struct aws_http_stream *s_http_connection_make_request_patch(
+    struct aws_http_connection *client_connection,
+    const struct aws_http_make_request_options *options) {
+
+    struct aws_http_message *message = options->request;
+    struct aws_http_headers *headers = aws_http_message_get_headers(message);
+    struct aws_byte_cursor out_value;
+    int e = aws_http_headers_get(headers, 
aws_byte_cursor_from_c_str("Content-Length"), &out_value);
+    AWS_FATAL_ASSERT(e == AWS_OP_ERR); // Assert that the header is not present
+    AWS_FATAL_ASSERT(aws_last_error() == AWS_ERROR_HTTP_HEADER_NOT_FOUND);
+
+    return aws_http_connection_make_request(client_connection, options);
+}
+
+AWS_TEST_CASE(test_s3_default_get_without_content_length, 
s_test_s3_default_get_without_content_length)
+static int s_test_s3_default_get_without_content_length(struct aws_allocator 
*allocator, void *ctx) {
+    (void)ctx;
+
+    struct aws_s3_tester tester;
+    ASSERT_SUCCESS(aws_s3_tester_init(allocator, &tester));
+
+    struct aws_s3_client *client = NULL;
+    struct aws_s3_tester_client_options client_options;
+    AWS_ZERO_STRUCT(client_options);
+
+    ASSERT_SUCCESS(aws_s3_tester_client_new(&tester, &client_options, 
&client));
+    struct aws_s3_client_vtable *patched_client_vtable = 
aws_s3_tester_patch_client_vtable(&tester, client, NULL);
+    patched_client_vtable->http_connection_make_request = 
s_http_connection_make_request_patch;
+
+    struct aws_s3_meta_request_test_results meta_request_test_results;
+    aws_s3_meta_request_test_results_init(&meta_request_test_results, 
allocator);
+
+    struct aws_string *host_name =
+        aws_s3_tester_build_endpoint_string(allocator, 
&g_test_public_bucket_name, &g_test_s3_region);
+
+    /* Put together a simple S3 Get Object request. */
+    struct aws_http_message *message = aws_s3_test_get_object_request_new(
+        allocator, aws_byte_cursor_from_string(host_name), 
g_pre_existing_object_1MB);
+
+    struct aws_s3_meta_request_options options;
+    AWS_ZERO_STRUCT(options);
+    /* Send default type */
+    options.type = AWS_S3_META_REQUEST_TYPE_DEFAULT;
+    options.message = message;
+    options.operation_name = aws_byte_cursor_from_c_str("GetObject");
+
+    ASSERT_SUCCESS(aws_s3_tester_send_meta_request(
+        &tester, client, &options, &meta_request_test_results, 
AWS_S3_TESTER_SEND_META_REQUEST_EXPECT_SUCCESS));
+    
ASSERT_SUCCESS(aws_s3_tester_validate_get_object_results(&meta_request_test_results,
 0));
+
+    aws_s3_meta_request_test_results_clean_up(&meta_request_test_results);
+    aws_string_destroy(host_name);
+    aws_http_message_release(message);
+    aws_s3_client_release(client);
+    aws_s3_tester_clean_up(&tester);
+
+    return AWS_OP_SUCCESS;
+}

Reply via email to