HTTP clients use the Host header to indicate the host and port number of the resource requested. The HTTP Connector Request operation autogenerates this mandatory header considering the configured host and port. However, servers often consider the port information optional and fail if they receive a request containing it.
Report such failures to the server owner to correct. Meanwhile, work around the issue by manually modifying the Request operation to output a Host header without the port information.
The following example shows a <http:headers> configuration that sends a Host: somehost.com header:
<flow name="connectingToFaultyServer">
<http:request method="GET" url="http://somehost.com:8081/api/v3/someresource">
<http:headers>
#[{"Host" : "somehost.com"}]
</http:headers>
</http:request>
<logger level="INFO"
message="#['Received a ' ++ attributes.status code ++ ' response with body: {' ++ payload ++ '}']"/>
</flow>
Without the explicit header configuration, an autogenerated Host: somehost.com:8081 would be sent.