samuong / alpaca

A local HTTP proxy for command-line tools. Supports PAC scripts and NTLM authentication.
Apache License 2.0
196 stars 35 forks source link

The Google Cloud SDK (gcloud) doesn't work through Alpaca #29

Closed samuong closed 5 years ago

samuong commented 5 years ago

Steps to reproduce:

  1. Set up the proxy to go via Alpaca, by following the instructions at: https://cloud.google.com/sdk/docs/proxy-settings#proxy_configuration
  2. Run gcloud compute addresses list. If you haven't already done so, it'll ask you to provide your credentials and project name.

The output should look like this:

$ gcloud compute addresses list
Listed 0 items.

But what actually happens is that it just sits there doing nothing.

samuong commented 5 years ago

This regression started with 42e94be.

samuong commented 5 years ago

Turns out this is due to the wrong newline character being used. It should be \r\n, not just \n, according to https://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2.