Commit c61336c8 authored by David Fifield's avatar David Fifield Committed by Arlo Breault
Browse files

Use ResolveReference to construct the /client URL.

This way works when the base URL lacks a path, e.g.
"http://127.0.0.1:8080".
https://bugs.torproject.org/25472
parent 8a31312c
......@@ -80,7 +80,8 @@ func (bc *BrokerChannel) Negotiate(offer *webrtc.SessionDescription) (
bc.Host, "\nFront URL: ", bc.url.Host)
data := bytes.NewReader([]byte(offer.Serialize()))
// Suffix with broker's client registration handler.
request, err := http.NewRequest("POST", bc.url.String()+"client", data)
clientURL := bc.url.ResolveReference(&url.URL{Path: "client"})
request, err := http.NewRequest("POST", clientURL.String(), data)
if nil != err {
return nil, err
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment