<!-- 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();
```
auth_header = headers.get('authorization', '')
        host = headers.get('host', '')
        headers[HEADER_LOCALSTACK_EDGE_URL] = 'https://%s' % host
        
        api, port, path, host = get_api_from_headers(headers, path)
        if port and int(port) < 0:
            return 404
        if not port:
            port = get_port_from_custom_rules(method, path, data, headers) or port
        if not port:
            if api in ['', None, '_unknown_']:
                truncated = truncate(data)
                LOG.info(('Unable to find forwarding rule for host "%s", path "%s", '
                    'target header "%s", auth header "%s", data "%s"') % (host, path, target, auth_header, truncated))
            else:
                LOG.info(('Unable to determine forwarding port for API "%s" - please '
                    'make sure this API is enabled via the SERVICES configuration') % api)
            response = Response()
            response.status_code = 404
            response._content = '{"status": "running"}'
            return response
        connect_host = '%s:%s' % (config.HOSTNAME, port)
        url = '%s://%s%s' % (get_service_protocol(), connect_host, path)
        headers['Host'] = host
        function = getattr(requests, method.lower())
        if isinstance(data, dict):
            data = json.dumps(data)
        response = function(url, data=data, headers=headers, verify=False)
        return response
def get_api_from_headers(headers, path=None):