<!-- Love localstack? Please consider supporting our collective:
👉  https://opencollective.com/localstack/donate -->

# Type of request: This is a ...

[x] bug report
[ ] feature request

# Detailed description

Using node.js AWS SDK function `getObject` returns object with `0` bytes using 4566 port. 
On port 4572 it works fine.

# Steps to reproduce

## Command used to start LocalStack

```
  localstack:
    image: localstack/localstack
    networks:
      - localstack-network
    ports:
      - 4566:4566
      - 4572:4572
      - 8080:8080
    environment:
      - DEBUG=1
      - HOSTNAME_EXTERNAL=localstack
      - SERVICES=sqs,lambda,cloudwatch,s3,iam,ec2,stepfunctions,cloudwatchlogs
      - LAMBDA_REMOTE_DOCKER=false
      - LAMBDA_EXECUTOR=docker
      - LAMBDA_DOCKER_NETWORK=localstack-network
      - AWS_ACCESS_KEY_ID=123
      - AWS_SECRET_ACCESS_KEY=xyz
      - DEFAULT_REGION=us-east-1
      - DOCKER_HOST=unix:///var/run/docker.sock
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - /tmp/localstack:/tmp/localstack
```

## Client code (AWS SDK code snippet, or sequence of "awslocal" commands)

```
export const s3 = new AWS.S3({
  endpoint: `http://localhost:4566`,
  s3ForcePathStyle: true,
  sslEnabled: false
});

const { Body } = await s3.getObject({
 Bucket: 'bucket',
 Key: 'file.json'
}).promise();
```
self.end_headers()
            
            self.close_connection = 1
        finally:
            try:
                self.wfile.flush()
            except Exception as e:
                LOG.warning('Unable to flush write file: %s' % e)
    def _listeners(self):
        return self.DEFAULT_LISTENERS + [self.proxy.update_listener]
    def log_message(self, format, *args):
        return
    def send_multi_value_headers(self, multi_value_headers):
        for key, values in multi_value_headers.items():
            for value in values:
                self.send_header(key, value)
def append_cors_headers(response=None):
    
    headers = response is not None and response.headers or {}
    if 'Access-Control-Allow-Origin' not in headers:
        headers['Access-Control-Allow-Origin'] = '*'
    if 'Access-Control-Allow-Methods' not in headers:
        headers['Access-Control-Allow-Methods'] = ','.join(CORS_ALLOWED_METHODS)
    if 'Access-Control-Allow-Headers' not in headers:
        requested_headers = headers.get('Access-Control-Request-Headers', '')
        requested_headers = re.split(r'[,\s]+', requested_headers) + CORS_ALLOWED_HEADERS
        headers['Access-Control-Allow-Headers'] = ','.join([h for h in requested_headers if h])
    if 'Access-Control-Expose-Headers' not in headers:
        headers['Access-Control-Expose-Headers'] = ','.join(CORS_EXPOSE_HEADERS)
def modify_and_forward(method=None, path=None, data_bytes=None, headers=None, forward_base_url=None,