summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/custodian/protocoltest/http.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb
index ac41b55..3ceedb3 100644
--- a/lib/custodian/protocoltest/http.rb
+++ b/lib/custodian/protocoltest/http.rb
@@ -144,6 +144,12 @@ module Custodian
if ( line =~ /without\s+cache\s+busting/ )
@cache_busting = false
end
+
+ # Do we need to override the HTTP Host: Header?
+ @host_override = nil
+ if ( line =~ /with host header '([^']+)'/)
+ @host_override = $1.dup
+ end
end
@@ -247,6 +253,10 @@ module Custodian
c.follow_location = true
c.max_redirects = 10
end
+
+ unless @host_override.nil?
+ c.headers["Host"] = @host_override
+ end
c.ssl_verify_host = false
c.ssl_verify_peer = false