Since POST doesn't follow redirects (per design, see #35), I need to be able to detect when a redirect happens and figure out the new URL, so I can re-issue my POST request.
Actually, git does a GET request before each POST request, so I can probably detect the redirect from the first GET request and infer the new correct path for the POST request before I make it. But either way, basically I need to recover the new URL after redirection is resolved.
Since POST doesn't follow redirects (per design, see #35), I need to be able to detect when a redirect happens and figure out the new URL, so I can re-issue my POST request.
Here's what I have so far:
That gets me the path, but I haven't figured out the best way to get the protocol/hostname/port.