Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

weird issue with the proxy settings if 'proxy_server' seems to be set not fully correct #506

Open
merclangrat opened this issue Sep 20, 2023 · 0 comments

Comments

@merclangrat
Copy link

We use archive module in our setup and we found a weird issue: puppet was failing with the error
Error: Failed to apply catalog: undefined method `to_sym' for nil:NilClass
in the following line

self[:proxy_type] ||= URI(self[:proxy_server]).scheme.to_sym

That looked weird. On some our servers we have proxy but on other ones we don't, there proxy_server was set to undef, but, as I understand, Ruby considered that it's not empty and tried to use URI.scheme (which returned "nil" and then failed)

I tried different approaches and had to hack the code to make it working, checking not self[:proxy_server] in Line 277 but URI(self[:proxy_server]).scheme

Can you please have a look into this issue? I am not familiar with Ruby and that was the easiest approach I could find.
Maybe, if proxy_server is not empty but doesn't have a scheme (e.g. proxy.example.com:3128, not http://proxy.example.com:3128, the module would consider http as a default scheme?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant