MicrosoftEdge / MicrosoftEdge/WebView2Feedback

DevToolsProtocolExtension's Network.Headers type is wrongly defined

Open
#2,488 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug tracked
Dominant language
PowerShell
Stars
526
Forks
67
PR merge metrics
No merged PRs in 30d

Description

Description
The Headers class defined under Microsoft.Web.WebView2.Core.DevToolsProtocolExtension namespace's Network class is defined as an empty class with no properties or methods. This makes it impossible to retrieve the actual header data after retrieving data about a request or response.

This is the definition of a Response class, for example:
image
Here you can see that Headers class has no methods or properties whatsoever, making it impossible to retrieve data from it:
image

From the Chrome Devtools' GitHub page documentation:

Network.Headers - Request / response headers as keys / values of JSON object. Type: object

You can see that the headers property indeed is an object containing key-value pairs of headers (Taken from protocol monitor):
image

I'm assuming this happened because the types are auto-generated from some other source - perhaps the header property should instead be defined as something like Dictionary<string, string> or some sort of collection containing key-value pairs?

If the types are auto-generated, it also might be worth it to verify other auto-generated types to see if any of it also has no properties / methods?

Version
SDK: 1.0.1150.38
DevToolsProtocolExtension: 1.0.824
Framework: WPF
(Leaving out the rest since they are unrelated)

AB#40023418

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Microsoft.Web.WebView2.Core.DevToolsProtocolExtension.Network.Headers definition and compare it with the Chrome DevTools Protocol Network.Headers documentation linked in the issue. Trace how it is exposed through request and response data; done means callers can retrieve header names and values rather than receiving an empty type.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, desktop, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.