Open net1957 opened 7 years ago
I'm not sure in what constellation - gems, tools etc. you get this error. Is the proxy.pac middleware involved? Can you put together a PR with a failing test?
Do I understand it correctly, that you get the error while downloading the file? I use middleman to compile the proxy.pac, deploy it to a docroot and serve it via apache
So there's noch ruby involved during download.
on excon i found this bug https://github.com/excon/excon/issues/606 Perhaps it's related
I developed a little rails application to check the result of proxy script urls given by the user I use this in my code on a rails application: ip, name and url are user entries
env = ProxyPacRb::Environment.new(client_ip: ip)
script = ProxyPacRb::Parser.new(environment: env).parse(name)
script.find(url)
name can contains a script or a url pointing to a script
Can you provide a dump of the exception? What you could do for now is to fetch the file "yourself" and just provide the content to the gem.
The problem is this: This gem is directly related to my daily work and I'm still working with my boss on the permission to work on Open Source Software during business hours/in my free time although it's related to my work.
So I would be very happy to merge a PR fixing this, but I cannot provide a PR for the time being.
on linux with MRI ruby 2.2.7-p470 i got encoding errors.
If you use a proxy file from a URL http://xxxxx/myproxy.pac it it returned as 'ASCII-8BIT' but it is really 'UTF-8' encoded. If you have some non ascii characters in the script it will fail.
I don't know if all servers have this issue or if it is related to excon gem (see https://github.com/excon/excon/issues/606) or other code.
I see you have already some test for other ruby flavors. I did simply use this monkey patch as a workaround:
What do you think about that ? Have you better way to solve this ?
Regards
@maxmeyer