Closed omeshp closed 6 years ago
@omeshp we need encodeURIComponent
because we want to allow proxy password contains reserved chars. ;,/?:@&=+$
@TingluoHuang password is sent as a part of header so they shouldn't be URL encoded. Currently reserved characters aren't working with proxy, this fix is to make them work.
@omeshp Got it. Thanks for finding and fixing this. Changes looks good to me.
Environment
Node version: 6.x Npm version: OS and version: typed-rest-client version: 0.15.1
Issue Description
If password has characters like ':' '\' proxy doesn't work, since we are url encoding the password at https://github.com/Microsoft/typed-rest-client/blob/93448b8ffdf5183cddb710d0fde99d7e697026f1/lib/HttpClient.ts#L408
Expected behaviour
Proxy should work when password has url sensitive characters.
Actual behaviour
Error: tunneling socket could not be established, statusCode=407