You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to Squid documentation, the cache_object:// URI scheme is deprecated.
Squid 6.3 accidentally removed support for legacy cache_object URLs, but Squid 6.4 reinstated support for them (squid-cache/squid#1475), at least for now. Support for the legacy cache_object URLs is slated for final removal in Squid 7.
The modern method of fetching this information is using the squid-internal-mgr URLs with a standard HTTP client. For example, it can be accessed simply with curl (i.e. instead of the legacy / deprecated squidclient tool) as:
Squid has supported this method since version 3.2.0.10, released in July 2011.
Support for the legacy cache_object URLs has already been removed from Squid's master branch, and will thus be absent when Squid 7 is released.
To support Squid 7 and later, squid-exporter needs to implement support for the squid-internal-mgr endpoint via HTTP(S). Since this method has been supported by Squid for well over ten years, I also suggest that it is time for squid-exporter to remove support for the legacy cache_object:// method.
The text was updated successfully, but these errors were encountered:
Just for the record, I was planning to refactor squid-exporter's cache_object get() function using a custom HTTP RoundTripper. The reason for needing a custom RoundTripper is that the cache_object:// URI is not RFC-3986 compliant, and is thus rejected by Go's default HTTP transport.
I did get 90% of the way there, but things started to get fiddly with refactoring the client test to use a httptest server (which also would have required a custom RoundTripper to accept the non-compliant cache_object:// URI in the GET request). Given that this legacy code just needs to die, I decided to stop wasting my time on that effort.
I am happy to provide a PR which will drop support for the legacy cache_object:// URI and instead implement support for the squid-internal-mgr style endpoint. Such a PR would likely obsolete a couple of outstanding PRs, and might also inadvertently fix a couple of outstanding issues.
According to Squid documentation, the
cache_object://
URI scheme is deprecated.Squid 6.3 accidentally removed support for legacy cache_object URLs, but Squid 6.4 reinstated support for them (squid-cache/squid#1475), at least for now. Support for the legacy cache_object URLs is slated for final removal in Squid 7.
The modern method of fetching this information is using the
squid-internal-mgr
URLs with a standard HTTP client. For example, it can be accessed simply withcurl
(i.e. instead of the legacy / deprecatedsquidclient
tool) as:Squid has supported this method since version 3.2.0.10, released in July 2011.
Support for the legacy cache_object URLs has already been removed from Squid's master branch, and will thus be absent when Squid 7 is released.
To support Squid 7 and later, squid-exporter needs to implement support for the squid-internal-mgr endpoint via HTTP(S). Since this method has been supported by Squid for well over ten years, I also suggest that it is time for squid-exporter to remove support for the legacy
cache_object://
method.The text was updated successfully, but these errors were encountered: