|
@@ -65,6 +65,50 @@ func TestTransferURLs(t *testing.T) {
|
|
|
decodedA,
|
|
decodedA,
|
|
|
1,
|
|
1,
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ "single URL, fronting spec, invalid skip verify",
|
|
|
|
|
+ TransferURLs{
|
|
|
|
|
+ {
|
|
|
|
|
+ URL: encodedA,
|
|
|
|
|
+ OnlyAfterAttempts: 0,
|
|
|
|
|
+ FrontingSpecs: []*FrontingSpec{
|
|
|
|
|
+ {
|
|
|
|
|
+ FrontingProviderID: "frontingProvider",
|
|
|
|
|
+ Addresses: []string{"example.org"},
|
|
|
|
|
+ VerifyServerName: "example.com",
|
|
|
|
|
+ Host: "example.org",
|
|
|
|
|
+ SkipVerify: true,
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ 1,
|
|
|
|
|
+ false,
|
|
|
|
|
+ decodedA,
|
|
|
|
|
+ 1,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ "single URL, multiple attempts, fronting spec",
|
|
|
|
|
+ TransferURLs{
|
|
|
|
|
+ {
|
|
|
|
|
+ URL: encodedA,
|
|
|
|
|
+ OnlyAfterAttempts: 0,
|
|
|
|
|
+ FrontingSpecs: []*FrontingSpec{
|
|
|
|
|
+ {
|
|
|
|
|
+ FrontingProviderID: "frontingProvider",
|
|
|
|
|
+ Addresses: []string{"example.org"},
|
|
|
|
|
+ VerifyServerName: "example.com",
|
|
|
|
|
+ Host: "example.org",
|
|
|
|
|
+ SkipVerify: false,
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ 2,
|
|
|
|
|
+ true,
|
|
|
|
|
+ decodedA,
|
|
|
|
|
+ 1,
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
"multiple URLs, single attempt",
|
|
"multiple URLs, single attempt",
|
|
|
TransferURLs{
|
|
TransferURLs{
|