'If a cookie is setup as secure, it won\'t be sent with the request if
it\'s not over HTTPS.'

def test_secureCookieOnInsecureConnection(self):

    uri = 'http://example.com/foo?bar'
    cookie = 'foo=1;secure'
    cookieJar = cookielib.CookieJar()
    self.addCookies(cookieJar, uri, [cookie])
    self.assertEqual(len(list(cookieJar)), 1)
    agent = self.buildAgentForWrapperTest(self.reactor)
    cookieAgent = client.CookieAgent(agent, cookieJar)
    cookieAgent.request('GET', uri)
    (req, res) = self.protocol.requests.pop()
    self.assertIdentical(None, req.headers.getRawHeaders('cookie'))
