### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

There is an issue with `get-object-attributes` command which results in below error always: 
`aws --endpoint-url=http://localhost:4566 s3api get-object-attributes --bucket s3mock --key 20.txt --object-attributes "ObjectSize"`
````

> Response:  Unable to parse response (syntax error: line 1, column 0), invalid XML received. Further retries may succeed:
b'98\n5\n'
````

### How are you starting LocalStack?

With a docker-compose file

### Steps To Reproduce

#### Using docker-compse.yaml to start localstack

docker-compse.yaml:

```
localstack:
    image: localstack/localstack:latest
    ports:
      - '4563-4599:4563-4599'
      - '8055:8080'
    environment:
      - SERVICES=s3
      - DEBUG=1
      - LS_LOG=error
      - DATA_DIR=/tmp/localstack/data
      - AWS_DEFAULT_REGION=eu-west-1
      # - EDGE_PORT=4566
    volumes:
      - "./.localstack:/tmp/localstack"
      - "/var/run/docker.sock:/var/run/docker.sock"
```

#### cli commands to reproduce the issue

1. Create a Bucket: `aws --endpoint-url=http://localhost:4566 s3 mb s3://s3mock`
2. Create an Object: `aws --endpoint-url=http://localhost:4566 s3 cp data/20.txt s3://s3mock`

File 20.txt content are 2-digit numbers separated by newline.

3. get-object-attributes for object 20.txt :
```

 aws --endpoint-url=http://localhost:4566 s3api get-object-attributes --bucket s3mock --key 20.txt --object-attributes "ObjectSize"

```
Results in error:

> Unable to parse response (syntax error: line 1, column 0), invalid XML received. Further retries may succeed:
b'98\n5\n'



### Environment

```markdown
- OS:Mac 12.x
- LocalStack:latest
- Node 14
```


### Anything else?

_No response_
path_parts = self.old_path.split("/")
                path_parts = [bucket_name] + path_parts
                path_parts = [part for part in path_parts if part]
                new_path = "/" + "/".join(path_parts) or "/"
                # create a new RAW_URI for the WSGI environment, this is necessary because of our `get_raw_path` utility
                if self.old_raw_uri:
                    path_parts = self.old_raw_uri.split("/")
                    path_parts = [bucket_name] + path_parts
                    path_parts = [part for part in path_parts if part]
                    /"
                    if qs := self.request.query_string:
                        new_raw_uri += "?" + qs.decode("utf-8")
                else:
                    new_raw_uri = None
                # set the new path and host
                self._set_request_props(self.request, new_path, new_host, new_raw_uri)
            n self.request
        def __exit__(self, exc_type, exc_value, exc_traceback):
            # reset the original request properties on exit of the context
            if self.old_host or self.old_path:
                self._set_request_props(
                    self.request, self.old_path, self.old_host, self.old_raw_uri
                )
        @staticmethod
        def _set_request_props(
            request: HttpRequest, path: str, host: str, raw_uri: Optional[str] = None
        ):
            """Sets the HTTP request's path and host and clears the cache in the request object."""
            request.path = path
            request.headers["Host"] = host