net: Send Cookies to Devtools (#38601)

The current behaviour in dev tools network monitor is missing cookies in
the cookies tab in Request Details, displaying "No cookies for this
request" even for requests with cookies.
The changes in this PR refactors the `request_cookies` and
`response_cookies` to check and retrieve the cookies if available
Also, the structure in which the cookies is sent to devtools is been
refactored to match the format firefox's devtools client expects.
With these changes, we now have the cookies displayed for requests that
have one.

Fixes: https://github.com/servo/servo/issues/38127

---------

Signed-off-by: uthmaniv <uthmanyahayababa@gmail.com>
This commit is contained in:
Usman Yahaya Baba 2025-08-12 13:42:28 +09:00 committed by GitHub
parent 122069cf43
commit 1995e22e19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 81 additions and 42 deletions

1
Cargo.lock generated
View file

@ -1923,6 +1923,7 @@ dependencies = [
"http 1.3.1",
"ipc-channel",
"log",
"net",
"net_traits",
"serde",
"serde_json",