Nick O: To deal with multiple cookies in the same header changed the way headers are retrieved from the http response