<!-- 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();
```
for header_key, header_value in iteritems(response.headers):
                
                if header_key.lower() not in ('transfer-encoding', 'date', 'server'):
                    self.send_header(header_key, header_value)
                    content_length_sent = content_length_sent or header_key.lower() == 'content-length'
            
            if not content_length_sent and not is_chunked:
                self.send_header('Content-Length', '%s' % len(response.content) if response.content else 0)
            if isinstance(response, LambdaResponse):
                self.send_multi_value_headers(response.multi_value_headers)
            self.end_headers()
            if response.content and len(response.content):
                self.wfile.write(to_bytes(response.content))
        except Exception as e:
            trace = str(traceback.format_exc())
            conn_errors = ('ConnectionRefusedError', 'NewConnectionError',
                           'Connection aborted', 'Unexpected EOF', 'Connection reset by peer',
                           'cannot read from timed out object')
            conn_error = any(e in trace for e in conn_errors)
            error_msg = 'Error forwarding request: %s %s' % (e, trace)
            if 'Broken pipe' in trace:
                LOG.warn('Connection prematurely closed by client (broken pipe).')
            elif not self.proxy.quiet or not conn_error:
                LOG.error(error_msg)
                if os.environ.get(ENV_INTERNAL_TEST_RUN):
                    
                    
                    
                    print('ERROR: %s' % error_msg)
            self.send_response(502)