mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
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
This commit is contained in:
parent
8a31312ca1
commit
c61336c897
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue