ariya/phantomjs — pull request #12383 by china1000 (2014-07-17 10:49:22+00:00)
Title: 1.9

Setting Custom Headers
It works great to the extent that it creates and sends the http request with your custom headers. It fails however to set the document.referrer (as an example) value as accessible by Javascript on the website.
Below is my testcase, it just does not work when I set referer using phantomjs.
Obvious we need a fix about this.

1. phantomjs code.
page.customHeaders = {
'Referer' : 'http://sogou.com',
};

2. Test html file, which checks the referer.