# Type of request: This is a ...

[X] bug report
[ ] feature request

# Detailed description

When using the AWS Java client v2 to access eg SQS in localstack, the client throws a `software.amazon.awssdk.core.exception.Crc32MismatchException: Expected 3405306242 as the Crc32 checksum but the actual calculated checksum was 4230070430`. 

## Expected behavior

The V2 client should work in the same circumstances that the V1 client does.

## Actual behavior

Exception is thrown:

```
software.amazon.awssdk.core.exception.Crc32MismatchException: Expected 3934920683 as the Crc32 checksum but the actual calculated checksum was 3696428791

	at software.amazon.awssdk.core.exception.Crc32MismatchException$BuilderImpl.build(Crc32MismatchException.java:88)
	at software.amazon.awssdk.core.internal.util.Crc32ChecksumValidatingInputStream.validateChecksum(Crc32ChecksumValidatingInputStream.java:62)
	at software.amazon.awssdk.core.internal.util.Crc32ChecksumValidatingInputStream.close(Crc32ChecksumValidatingInputStream.java:50)
	at java.io.FilterInputStream.close(FilterInputStream.java:181)
	at software.amazon.awssdk.protocols.query.internal.unmarshall.AwsQueryResponseHandler.lambda$handle$1(AwsQueryResponseHandler.java:63)
	at java.util.Optional.ifPresent(Optional.java:159)
	at software.amazon.awssdk.protocols.query.internal.unmarshall.AwsQueryResponseHandler.handle(AwsQueryResponseHandler.java:61)
	at software.amazon.awssdk.protocols.query.internal.unmarshall.AwsQueryResponseHandler.handle(AwsQueryResponseHandler.java:41)
	at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler$Crc32ValidationResponseHandler.handle(AwsSyncClientHandler.java:94)
	at software.amazon.awssdk.core.internal.handler.BaseClientHandler.lambda$resultTransformationResponseHandler$5(BaseClientHandler.java:231)
	at software.amazon.awssdk.core.internal.http.CombinedResponseHandler.handleSuccessResponse(CombinedResponseHandler.java:97)
	at software.amazon.awssdk.core.internal.http.CombinedResponseHandler.handleResponse(CombinedResponseHandler.java:72)
	at software.amazon.awssdk.core.internal.http.CombinedResponseHandler.handle(CombinedResponseHandler.java:59)
	at software.amazon.awssdk.core.internal.http.CombinedResponseHandler.handle(CombinedResponseHandler.java:40)
	at software.amazon.awssdk.core.internal.http.pipeline.stages.HandleResponseStage.execute(HandleResponseStage.java:40)
	at software.amazon.awssdk.core.internal.http.pipeline.stages.HandleResponseStage.execute(HandleResponseStage.java:30)
	at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:73)
	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallAttemptTimeoutTrackingStage.execute(ApiCallAttemptTimeoutTrackingStage.java:42)
	at software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:77)
	at software.amazon.awssdk.core.internal.http.pipeline.stages.TimeoutExceptionHandlingStage.execute(TimeoutExceptionHandlingStage.java:39)
	at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:64)
	at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:34)
	at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
	at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:56)
	at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:36)
	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.executeWithTimer(ApiCallTimeoutTrackingStage.java:80)
	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:60)
	at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:42)
	at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
	at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
	at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:37)
	at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:26)
	at software.amazon.awssdk.core.internal.http.AmazonSyncHttpClient$RequestExecutionBuilderImpl.execute(AmazonSyncHttpClient.java:189)
	at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.invoke(BaseSyncClientHandler.java:121)
	at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.doExecute(BaseSyncClientHandler.java:147)
	at software.amazon.awssdk.core.internal.handler.BaseSyncClientHandler.execute(BaseSyncClientHandler.java:101)
	at software.amazon.awssdk.core.client.handler.SdkSyncClientHandler.execute(SdkSyncClientHandler.java:45)
	at software.amazon.awssdk.awscore.client.handler.AwsSyncClientHandler.execute(AwsSyncClientHandler.java:55)
	at software.amazon.awssdk.services.sqs.DefaultSqsClient.getQueueUrl(DefaultSqsClient.java:752)
	at software.amazon.awssdk.services.sqs.SqsClient.getQueueUrl(SqsClient.java:1299)
```

# Steps to reproduce

      AmazonSQS sqs = AmazonSQSClientBuilder
        .standard()
        .withEndpointConfiguration(container.getEndpointConfiguration(SQS))
        .withCredentials(container.getDefaultCredentialsProvider())
        .build();
      sqs.createQueue(INIT_QUEUE_NAME);

      SqsClient sqs = SqsClient.builder()
      .endpointOverride(container.getEndpointOverride(service))
      .credentialsProvider(
        StaticCredentialsProvider.create(
          AwsBasicCredentials.create(
            container.getAccessKey(),
            container.getSecretKey()
          )
        )
      )
      .region(Region.of(container.getRegion()))
      .build;
      assertThat(sqs.getQueueUrl(b -> b.queueName(INIT_QUEUE_NAME)).queueUrl()).isNotBlank();

## Command used to start LocalStack

```
new LocalStackContainer("0.11.3")
      .withNetwork(Network.SHARED)
      .withNetworkAliases("localstack")
      .withEnv("HOSTNAME_EXTERNAL", "localhost")
      .withServices(S3, SQS, SNS)
      .withEnv("DEBUG", "1")
```

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

See "steps to reproduce".

external_port = SQS_PORT_EXTERNAL or get_external_port(headers, request_handler)
            content_str = re.sub(r'<QueueUrl>\s*([a-z]+)://[^<]*:([0-9]+)/([^<]*)\s*</QueueUrl>',
                                 r'<QueueUrl>\1://%s:%s/\3</QueueUrl>' % (HOSTNAME_EXTERNAL, external_port),
                                 content_str)
            
            content_str = re.sub(r'<QueueUrl>\s*([a-z]+)://([^/]+)/queue/([^<]*)\s*</QueueUrl>',
                                 r'<QueueUrl>\1://\2/%s/\3</QueueUrl>' % constants.TEST_AWS_ACCOUNT_ID,
                                 content_str)
            
            content_str = re.sub(r'<([a-zA-Z0-9]+)>\s*arn:aws:sqs:elasticmq:([^<]+)</([a-zA-Z0-9]+)>',
                                 r'<\1>arn:aws:sqs:%s:\2</\3>' % region_name, content_str)
            if action == 'CreateQueue':
                queue_url = re.match(r'.*<QueueUrl>(.*)</QueueUrl>', content_str, re.DOTALL).group(1)
                if SQS_BACKEND_IMPL == 'elasticmq':
                    _set_queue_attributes(queue_url, req_data)
        elif action == 'SendMessageBatch':
            if validate_empty_message_batch(data, req_data):
                msg = 'There should be at least one SendMessageBatchRequestEntry in the request.'
                return make_requests_error(code=404, code_string='EmptyBatchRequest', message=msg)
        
        if action in ('SendMessage', 'SendMessageBatch'):
            _process_sent_message(path, req_data, headers)
        if content_str_original != content_str:
            
            response.headers['content-length'] = len(content_str)
            return requests_response(content_str, headers=response.headers, status_code=response.status_code)
    @classmethod
    
    def get_message_attributes_md5(cls, req_data):