From what I can see, TestBrowser (through mechanize) does correctly set the "Referer:" header in its requests when appropriate (following links, submitting forms, etc).
So the only case where the problem is exhibited is when TestBrowser does not send a "Referer:" header (i.e. browser.open()).
From what I can see, TestBrowser (through mechanize) does correctly set the "Referer:" header in its requests when appropriate (following links, submitting forms, etc).
So the only case where the problem is exhibited is when TestBrowser does not send a "Referer:" header (i.e. browser.open()).