I have opened a chrome browser with some command line options.When this is in normal mode (non headless mode) it is setting the required cookies in the “Network.requestWillBeSentExtraInfo” method and the request and response are as expected.
But when I open the chrome in headless mode with remaining command line options same as above it is not setting and not sending some cookies in “Network.requestWillBeSentExtraInfo” method because of which the request is failing i.e getting Bad Request in response.
Things Tried So far:
- Added –enable-experimental-cookie-features command line while opening chrome.
- Modified the “User-Agent” header same as that of Normal (non headless mode or UI mode).
But still facing the issue.
Observations
- The cookie which are set are having domain as “www.test.dd.cn” and the cookie which are not set are having domain as “.test.dd.cn” and remaining cookie properties are same.
Is this the limitation/bug in headless mode or anything else to be done to work as expected.