### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

Hi! 
I believe there is compatibility issue between localstack and Perl module wrapping S3 API [Net::Amazon::S3](https://metacpan.org/pod/Net::Amazon::S3). Uploading and downloading file works great, but listing bucket contents always gives empty list (i think also listing all buckets gives empty list but this is not an issue for me, since i'm always using one bucket). Listing files using AWS CLI, python's Boto3 or even old Perl alternative [Amazon::S3](https://metacpan.org/release/BIGFOOT/Amazon-S3-0.59/view/lib/Amazon/S3.pm) works OK for me.

### Expected Behavior

Both perl modules should be able to list bucket contents

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

#### Part of `docker-compose.yml`

```
  localstack:
    container_name: "${LOCALSTACK_DOCKER_NAME:-localstack-main}"
    image: localstack/localstack:latest
    ports:
      - "127.0.0.1:4566:4566"            # LocalStack Gateway
      - "127.0.0.1:4510-4559:4510-4559"  # external services port range
    environment:
      # LocalStack configuration: https://docs.localstack.cloud/references/configuration/
      - DEBUG=${DEBUG- }
    networks:
      - default


```
#### Perl code that prints nothing (i.e. can't see uploaded file)
```
#!/usr/bin/perl
use warnings;
use Net::Amazon::S3;

use Config::IniFiles;

my $bucket_name = "myname";
my $s3_endpoint = "localstack:4566";
my $homedir = "/usr/share/httpd";
my $aws_cfg = Config::IniFiles->new(-file => "$homedir/.aws/config");



my $s3 = Net::Amazon::S3->new(
    {
        aws_access_key_id => $aws_cfg->val('default', 'aws_access_key_id'),
        aws_secret_access_key => $aws_cfg->val('default', 'aws_secret_access_key'),
        retry => 1,
        host => $s3_endpoint,
        secure => 0,
        use_virtual_host => 0,
    }
);

$s3->add_bucket( { bucket => $bucket_name } )
    or die $s3->err . ": " . $s3->errstr;

my $bucket_obj = $s3->bucket($bucket_name);

my $bucket_contents = $bucket_obj->list
        or die $s3->err . ": " . $s3->errstr;

for my $key ( @{ $bucket_contents->{keys} } ) {
        print "$key->{key}\n";
}
```

#### Perl code that WORKS OK (i.e. prints out uploaded file "key")
```
#!/usr/bin/perl
use warnings;
use CGI::Carp;
use Amazon::S3;

use Config::IniFiles;

my $bucket_name = "/mybucket";
my $s3_endpoint = "localstack:4566";
my $homedir = "/usr/share/httpd";
my $aws_cfg = Config::IniFiles->new(-file => "$homedir/.aws/config");


my $s3 = Amazon::S3->new(
    {
        aws_access_key_id => $aws_cfg->val('default', 'aws_access_key_id'),
        aws_secret_access_key => $aws_cfg->val('default', 'aws_secret_access_key'),
        retry => 1,
        host => $s3_endpoint,
        secure => 0,
    }
);

$s3->add_bucket( { bucket => $bucket_name } )
    or die $s3->err . ": " . $s3->errstr;

my $bucket = $s3->bucket( $bucket_name );
my $keyname = 'testing.txt';
my $value   = 'T';
$bucket->add_key(
    $keyname, $value,
        {   content_type        => 'text/plain',
            'x-amz-meta-colour' => 'orange',
        }
   );

my $response = $bucket->list
     or die $s3->err . ": " . $s3->errstr;
print $response->{bucket}."\n";
for my $key (@{ $response->{keys} }) {
      print "\t".$key->{key}."\n";
}
```


### Environment

```markdown
- host OS: windows + WSL
- container OS (where perl is run): CentOS 7.9.2009
- LocalStack: 
localstack-main | LocalStack version: 3.0.3.dev
localstack-main | LocalStack build date: 2023-12-20
localstack-main | LocalStack build git hash: 5c3ef157
```


### Anything else?

Net::Amazon::S3 way works OK with real AWS S3 (eu-west-1)

"""
Response s for the different AWS service protocols.
The module contains classes that take a service's response dict, and
given an operation model, serialize the HTTP response according to the
specified output shape.
It can be seen as the counterpart to the ``parse`` module in ``botocore``
(which parses the result of these ). It has a lot of
similarities with the ``serialize`` module in ``botocore``, but
serves a different purpose (serializing responses instead of requests).
The different protocols have many similarities. The class hierarchy is
designed such that the s share as much logic as possible.
The class hierarchy looks as follows:
::
                                      ┌───────────────────┐
                                      │ResponseSerializer │
                                      └───────────────────┘
                                          ▲    ▲      ▲
                   ┌──────────────────────┘    │      └──────────────────┐
      ┌────────────┴────────────┐ ┌────────────┴─────────────┐ ┌─────────┴────────────┐
      │BaseXMLResponseSerializer│ │BaseRestResponseSerializer│ │JSONResponseSerializer│
      └─────────────────────────┘ └──────────────────────────┘ └──────────────────────┘
                         ▲    ▲             ▲             ▲              ▲
  ┌──────────────────────┴─┐ ┌┴─────────────┴──────────┐ ┌┴──────────────┴──────────┐
  │QueryResponseSerializer │ │RestXMLResponseSerializer│ │RestJSONResponseSerializer│
  └────────────────────────┘ └─────────────────────────┘ └──────────────────────────┘
              ▲
   ┌──────────┴──────────┐
   │EC2ResponseSerializer│
   └─────────────────────┘
::
The ``ResponseSerializer`` contains the logic that is used among all the
different protocols (``query``, ``json``, ``rest-json``, ``rest-xml``, and
``ec2``).
The protocols relate to each other in the following ways:
* The ``query`` and the ``rest-xml`` protocols both have XML bodies in their
  responses which are serialized quite similar