Network event cookies are missing all properties except name and value
Categories
(Remote Protocol :: WebDriver BiDi, defect, P2)
Tracking
(firefox151 fixed)
| Tracking | Status | |
|---|---|---|
| firefox151 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
References
(Blocks 3 open bugs)
Details
(Whiteboard: [webdriver:m20], [wptsync upstream][webdriver:relnote])
Attachments
(2 files)
The current network event cookies only contain name and value on Firefox.
They should be regular network.Cookie objects:
network.Cookie = {
name: text,
value: network.BytesValue,
domain: text,
path: text,
size: js-uint,
httpOnly: bool,
secure: bool,
sameSite: network.SameSite,
? expiry: js-uint,
Extensible,
};
https://w3c.github.io/webdriver-bidi/#serialize-cookie
I think we discussed this limitation when we implemented the events, but I don't think we filed bugs or wrote tests about it.
| Assignee | ||
Updated•2 years ago
|
Comment 1•2 years ago
|
||
The severity field is not set for this bug.
:whimboo, could you have a look please?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 2•2 years ago
|
||
Hi Valentin,
Right now we parse the headers from the channel (using visitRequestHeaders) and when we spot the cookie header, we simply parse it to extract name and values of the cookies.
Do you know if there is any API which we could use to easily get full details about the cookies for a given request (eg samesite, issecure, etc...). Otherwise we would use various APIs from Services.cookies but I wanted to check first with you if there was a better approach.
Comment 3•2 years ago
|
||
Currently cookies are added to the request this way:
HttpBaseChannel::AddCookiesToRequest -> GetCookieStringFromHttp -> GetCookiesForURI.
I'm thinking you could use getCookiesFromHost to get all the cookies - they might need to be sorted through to make sure we don't send the ones we don't have to, like GetCookiesForURI does.
Alternatively, you could create a XPIDL binding for ParseAttributes, and use that to parse the cookie header set on the request. I think that might be easier.
This issue prevents a client library that relies on strict compliance with the WebDriver BiDi specification from receiving and processing network events. WebDriverBiDi.NET is one such library, and one of its consumers is Puppeteer Sharp.
| Assignee | ||
Updated•3 months ago
|
| Assignee | ||
Updated•3 months ago
|
| Assignee | ||
Updated•3 months ago
|
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 5•2 months ago
|
||
I have an implementation in progress, but I think we have a conflict between the spec and our current wdspec tests on this topic. https://github.com/w3c/webdriver-bidi/issues/1110
| Assignee | ||
Comment 6•2 months ago
|
||
| Assignee | ||
Comment 7•2 months ago
|
||
https://hg.mozilla.org/mozilla-central/rev/15b6b9eee67c
https://hg.mozilla.org/mozilla-central/rev/71f0c2a21d10
Upstream PR merged by moz-wptsync-bot
| Assignee | ||
Comment 12•1 month ago
|
||
Some issues were spotted with the tests against Chrome, I pushed a PR upstream to fix this https://github.com/web-platform-tests/wpt/pull/59305
Updated•26 days ago
|
Description
•