mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Fix build
This commit is contained in:
@@ -20,7 +20,6 @@ import (
|
|||||||
"net/http/httptest"
|
"net/http/httptest"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"runtime"
|
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
@@ -116,6 +115,7 @@ func getTestServer(handler func(w http.ResponseWriter, r *http.Request)) (*httpt
|
|||||||
testServer := httptest.NewServer(http.HandlerFunc(handler))
|
testServer := httptest.NewServer(http.HandlerFunc(handler))
|
||||||
client := &http.Client{
|
client := &http.Client{
|
||||||
Transport: &http.Transport{Proxy: func(r *http.Request) (*url.URL, error) {
|
Transport: &http.Transport{Proxy: func(r *http.Request) (*url.URL, error) {
|
||||||
|
// Remove when https://github.com/golang/go/issues/13686 is fixed
|
||||||
r.Host = "gohugo.io"
|
r.Host = "gohugo.io"
|
||||||
return url.Parse(testServer.URL)
|
return url.Parse(testServer.URL)
|
||||||
}},
|
}},
|
||||||
|
Reference in New Issue
Block a user