I've sent a http request with custom headers to a localhost page, and the result is as follow image.
I used php to print out the requests. The printed requests are my custom requests as expect, but the other one in Chrome network tab is different. We can take User-Agent as an example. Why are they different? Which one should I believe?
P.S.
Maybe I cause some misunderstandings.
- I use selenium webdriver to control the browser to visit a website
- the UA is not from a Nexus, you can consider it as a custom value like "My UA"
The procedure is like [WebDriver] -> [Browser] -> [WebSite]
.
I guess maybe it is because that the chrome browser shows the default headers, and webdriver post the modified headers to browser to change them, and finally website server received the merged modified headers.