Skip to content

Rewrite url to guzzle#351

Open
TheSyscall wants to merge 2 commits into
mainfrom
rewrite-url-to-guzzle
Open

Rewrite url to guzzle#351
TheSyscall wants to merge 2 commits into
mainfrom
rewrite-url-to-guzzle

Conversation

@TheSyscall

Copy link
Copy Markdown

GraphiteWebClient used Icinga\Web\Url to manage the Graphite Web base URL. Url::fromPath() requires a FakeSchemeRequest workaround to prevent it from treating the Graphite URL as an internal Icinga Web path. A subsequent change to Url::fromPath() added scheme validation that rejects the fake scheme value, breaking any Graphite URL without an explicit port.

GraphiteWebClient has no inherent dependency on Icinga's web layer. This replaces Icinga\Web\Url with GuzzleHttp\Psr7\Uri, already available via Guzzle, typed against Psr\Http\Message\UriInterface, and removes FakeSchemeRequest entirely.

fixes #350

The icinga `Url::fromPath` method builds a path for the use in a
icingaweb, stripping scheme and host if it matches the current request.
This is undesired behavior for backend use. Since the
`GraphiteWebClient` already uses GuzzleHttp it is logical to use the
more versatile `UriInterface` interface and `Uri` class.
This class was used to get the `Url::fromPath` method into never
stripping the scheme and host parts, and forcing the URL to always be
external, even if the configured URL matches the current request url.
With the swtich to the `UriInterface` this workaround is no longer
required.
@cla-bot cla-bot Bot added the cla/signed label Jul 9, 2026
@TheSyscall
TheSyscall requested a review from lippserd July 9, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Graphite Web URL config broken after v2.14.0

1 participant