Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

called the correct method for setting HTTP headers

  • Loading branch information...
commit 9555134cdaa82b4ea33350dae1bf94fb673f1faf 1 parent b2fdbc2
@rayvahey rayvahey authored
View
6 src/groovy/com/grailsrocks/functionaltest/client/BrowserClient.groovy
@@ -231,7 +231,7 @@ class BrowserClient implements Client, WebWindowListener, HtmlAttributeChangeLis
if (currentAuthInfo) {
// @todo We could use htmlunit auth stuff here?
def encoded = Base64Codec.encode("${currentAuthInfo.user}:${currentAuthInfo.credentials}".getBytes('utf-8'))
- settings.addAdditionalHeader('Authorization', "Basic "+encoded)
+ settings.setAdditionalHeader('Authorization', "Basic "+encoded)
}
def wrapper
@@ -246,7 +246,7 @@ class BrowserClient implements Client, WebWindowListener, HtmlAttributeChangeLis
}
headerLists.each { headers ->
for (entry in headers) {
- settings.addAdditionalHeader(entry.key, entry.value.toString())
+ settings.setAdditionalHeader(entry.key, entry.value.toString())
}
}
@@ -302,4 +302,4 @@ class BrowserClient implements Client, WebWindowListener, HtmlAttributeChangeLis
}
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.