'Performs a GET and HEAD request and returns the GET response.
Fails if any ``Content-*`` headers returned by the two requests
differ.'

def get_and_head(self, *args, **kwargs):

    head_response = self.fetch(method='HEAD', *args, **kwargs)
    get_response = self.fetch(method='GET', *args, **kwargs)
    content_headers = set()
    for h in itertools.chain(head_response.headers, get_response.headers):
        if h.startswith('Content-'):
            content_headers.add(h)
    for h in content_headers:
        self.assertEqual(head_response.headers.get(h), get_response.headers.get(h), ('%s    differs    between    GET    (%s)    and    HEAD    (%s)' % (h, head_response.headers.get(h), get_response.headers.get(h))))
    return get_response
