bug #36609 Add missing port SQS Host Header request (jderusse)

This PR was merged into the 5.1-dev branch.

Discussion
----------

Add missing port SQS Host Header request

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | /
| License       | MIT
| Doc PR        | /

When user provides a custom endpoint, the port is missing from the `Host` headers, leading to wrong URL when calling `getQueueUrl`

Commits
-------

41165beb48 Add missing port SQS Host Header request
This commit is contained in:
Fabien Potencier 2020-05-01 08:04:26 +02:00
commit ed1b6eaf83

View File

@ -334,7 +334,7 @@ class Connection
$parsedUrl = parse_url($endpoint);
$headers = [
'host' => $parsedUrl['host'],
'host' => $parsedUrl['host'].($parsedUrl['port'] ? ':'.$parsedUrl['port'] : ''),
'x-amz-date' => $amzDate,
'content-type' => 'application/x-www-form-urlencoded',
];