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

Unable to parse an upstream URL that contains a Win Domain\user #790

Open
AndyGee opened this issue Dec 18, 2018 · 1 comment
Open

Unable to parse an upstream URL that contains a Win Domain\user #790

AndyGee opened this issue Dec 18, 2018 · 1 comment
Labels

Comments

@AndyGee
Copy link

AndyGee commented Dec 18, 2018

Given the following upstream URL:

http://WINDOMAIN\MYUSER:MyPw@proxy.blah.com:8080

HoverFly fails with this response:

Could not parse upstream proxy: %!(EXTRA string=parse http://WINDOMAIN\MYUSER:MyPw@proxy.blah.com:8080: net/url: invalid userinfo)

Escaping the backslash has the same issue.

An alternative syntax using an @ symbol also fails, due to the first @ being interpreted as the prefix marker, not the last:

http://MYUSER@WINDOMAIN:MyPw@proxy.blah.com:8080

Curl accepts both URL forms.

@tommysitu tommysitu added the bug label Jan 15, 2019
@benjih
Copy link
Contributor

benjih commented Jan 22, 2019

Just tried testing this for myself and got different but still unexpected results.

When testing it on Linux with

hoverctl start --upstream-proxy http://WINDOMAIN\MYUSER:MyPw@proxy.blah.com:8080

Hoverfly starts, but is configured with the incorrectly with the backslash ignored

"upstreamProxy":"http://WINDOMAINMYUSER:MyPw@proxy.blah.com:8080"

Also just tried

hoverctl start --upstream-proxy http://WINDOMAIN/\MYUSER:MyPw@proxy.blah.com:8080

Which I think worked? I'm unable to test the upstream working but Hoverfly does start with the upstreamProxy correctly configured.

"upstreamProxy":"http://WINDOMAIN/MYUSER:MyPw@proxy.blah.com:8080"

@AndyGee What OS are you using? Are you using hoverctl to start Hoverfly?

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

No branches or pull requests

3 participants