@@ -154,5 +154,15 @@ var _ = Describe("RedirectToHTTPS suite", func() {
154154 expectedStatus: 200,
155155 expectedBody: "test",
156156 }),
157+ // By using newRequest from httptest we get example.com as a Host
158+ // when the target is just a path.
159+ // For details: https://golang.org/pkg/net/http/httptest/#NewRequest
160+ Entry("without TLS with a path as request", &requestTableInput{
161+ requestString: "/",
162+ useTLS: false,
163+ expectedStatus: 308,
164+ expectedBody: permanentRedirectBody("https://example.com/"),
165+ expectedLocation: "https://example.com/",
166+ }),
157167 )
158168})