Skip to content

Commit

Permalink
fix: url scheme was overwriting that of the original req
Browse files Browse the repository at this point in the history
  • Loading branch information
aranhoide committed May 31, 2015
1 parent 6e568cc commit c4ac562
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/github.com/getlantern/fronted/dialer.go
Expand Up @@ -10,6 +10,7 @@ import (
"io"
"net"
"net/http"
"net/url"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -212,6 +213,8 @@ func (ddf *DirectDomainTransport) RoundTrip(req *http.Request) (resp *http.Respo
// create a copy.
norm := new(http.Request)
*norm = *req // includes shallow copies of maps, but okay
norm.URL = new(url.URL)
*norm.URL = *req.URL
norm.URL.Scheme = "http"
return ddf.Transport.RoundTrip(norm)
}
Expand Down

1 comment on commit c4ac562

@myleshorton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Please sign in to comment.