Permalink
Browse files

called the correct method for setting HTTP headers

  • Loading branch information...
1 parent b2fdbc2 commit 9555134cdaa82b4ea33350dae1bf94fb673f1faf @rayvahey rayvahey committed Aug 23, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 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
}
-}
+}

0 comments on commit 9555134

Please sign in to comment.