SimpleBrowserDotNet/SimpleBrowser

Referer set incorrectly when navigating

kevingy opened this issue · 1 comments

Consider this code:

browser.Navigate("http://github.com/");
browser.Navigate("https://msn.com/");

When the second navigation occurs, the referer is set to github.com incorrectly. There was no link clicked or other activity that directed or referred the browser to msn.com. The navigation to msn.com should have a blank referer value.

Browser.cs, approximately line 998:
referer = req.Referer;

Needs to be wrapped in a conditional statement that will set the referer only if the navigation is a referred navigation.