I am trying to setup an http_proxy on windows machine, the password has a special character (@) in it that is causing the 'set' to fail. I have tried both escaping the character (\@) and url encoding it with the hex value (%40) to no avail.

Other than changing the password how can I set http_proxy with that value?

Examples: Username=Foo Password=B@r set http_proxy=http://foo:B\@r@http-gateway.domain.org:80 set http_proxy=http://foo:B%40r@http-gateway.domain.org:80

link|improve this question
Is the set failing or is the tool using the http_proxy environment variable failing due to the @ symbol? – Mike Cornell Apr 22 '11 at 13:16
Yes. Because the format is username:password@server:port, having @ in the middle of your password causes the right hand side of your password to be considered the hostname, thus the hostname resolution above fails because it thinks the hostname is r@http-gateway.domain.org. The "r@" should not be there. – Philluminati Nov 3 '11 at 16:23
feedback

1 Answer

Based upon this answer on SO, can you try using ^ to escape the @ symbol?

link|improve this answer
In response to both, the set is successful, it is the tool using the environment variable: set http_proxy=http://foo:B^@r@http-gateway.domain.org:80 jruby -S gem install rake ERROR: While executing gem ... (URI::InvalidURIError) the scheme http does not accept registry part: foo:B@r@http-gateway.domain.org:80 (or bad hostname?) – pyropenguin Apr 22 '11 at 15:05
This is a Linux based question, not a Windows based question, using ^ doesn't work for me. I still get wget: unable to resolve host address tf4ce@server.company.com'` after setting the proxy environmental variable. – Philluminati Nov 3 '11 at 16:19
Actually it IS a Windows based question...I know pyropenguin personally. – Mike Cornell Nov 7 '11 at 18:24
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.