Comment 3 for bug 98437

Revision history for this message
James Henstridge (jamesh) wrote :

There are three places in zope/app/testing/functional.py that set default values for HTTP_REFERER:
 * BrowserTestCase.makeRequest()
 * HTTPTestCase.makeRequest()
 * HTTPCaller.__call__()

(this last one is the one that affects TestBrowser).

This is bad for two reasons:
 1. it is impossible to test behaviour when no referrer is passed.
 2. the "Referer" header is meant to be sent to a URL, not a hostname.