<!-- 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();
```
import requests
from ssl import SSLError
from asyncio.selector_events import BaseSelectorEventLoop
from six import iteritems
from flask_cors import CORS
from requests.models import Response, Request
from requests.structures import CaseInsensitiveDict
from six.moves.socketserver import ThreadingMixIn
from six.moves.urllib.parse import urlparse
from six.moves.BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
from localstack import config
from localstack.config import USE_SSL, EXTRA_CORS_ALLOWED_HEADERS, EXTRA_CORS_EXPOSE_HEADERS
from localstack.constants import ENV_INTERNAL_TEST_RUN, APPLICATION_JSON
from localstack.utils.server import http2_server
from localstack.utils.common import FuncThread, generate_ssl_cert, to_bytes, json_safe, TMP_THREADS, path_from_url
from localstack.utils.http_utils import uses_chunked_encoding, create_chunked_data
from localstack.utils.aws.aws_responses import LambdaResponse
LOG = logging.getLogger(__name__)
SERVER_CERT_PEM_FILE = 'server.test.pem'
USE_HTTP2_SERVER = config.USE_HTTP2_SERVER
CORS_ALLOWED_HEADERS = ['authorization', 'content-type', 'content-md5', 'cache-control',
    'x-amz-content-sha256', 'x-amz-date', 'x-amz-security-token', 'x-amz-user-agent',
    'x-amz-target', 'x-amz-acl', 'x-amz-version-id', 'x-localstack-target', 'x-amz-tagging']
if EXTRA_CORS_ALLOWED_HEADERS:
    CORS_ALLOWED_HEADERS += EXTRA_CORS_ALLOWED_HEADERS.split(',')
CORS_ALLOWED_METHODS = ('HEAD', 'GET', 'PUT', 'POST', 'DELETE', 'OPTIONS', 'PATCH')
CORS_EXPOSE_HEADERS = ('x-amz-version-id', )
if EXTRA_CORS_EXPOSE_HEADERS:
    CORS_EXPOSE_HEADERS += tuple(EXTRA_CORS_EXPOSE_HEADERS.split(','))
class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):