Closed domino316 closed 6 months ago
I suggest changes in files:
"smsapi/php-client/src/Curl/HttpClient.php"
private function prepareRequestHttpClient(RequestInterface $request)
{
$port = $request->getUri()->getPort() ? ':' . (string) $request->getUri()->getPort() : '';
$url = sprintf("%s://%s%s%s", $request->getUri()->getScheme(), $request->getUri()->getHost(), $port, $request->getRequestTarget());
"smsapi/php-client/src/Infrastructure/HttpClient/Decorator/BaseUriDecorator.php"
prependBaseUri()
$host = $baseUriParts['host'] ?? '';
$port = $baseUriParts['port'] ?? '';
$basePath = $baseUriParts['path'] ?? '';
$basePath = rtrim($basePath, '/');
$uri = $uri->withPath($basePath . '/' . $uri->getPath());
$uri = $uri->withHost($host);
$uri = $uri->withScheme($scheme);
$uri = $uri->withPort($port);
Hello,
I forwarded your requst to our IT department.
Hi,
I was trying to pass uri in smsapiPlServiceWithUri() method, and my uri contained port number. I saw that the messages was sent with default port 80. After some digging I saw that prepareRequestHttpClient is just not picking it from uri.
I have already figured it out and this is really small change. Or perhaps this is not possible due to backward compatibility or some security related stuff?