Bug 1790370 Comment 3 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Hi Valentin,

Question about nsIChannel's `protocolVersion`. In our current CDP implementation this is what we use to retrieve the protocol used for a given response. I am checking if I could reuse this for our WebDriver BiDi implementation. The specification for the `protocol` we should expose in our network events is at https://pr-preview.s3.amazonaws.com/w3c/webdriver-bidi/pull/204.html#get-the-protocol , the most important part being:
> If response’s final connection timing info is not null, set protocol to response’s final connection timing info's ALPN negotiated protocol. 

Does this match nsIChannel `protocolVersion`? If yes, do you know when we can start reading this on the channel? If not, do you have any suggestion to get the correct value here? 

Thanks!
Hi Valentin,

Question about nsIChannel's `protocolVersion`. In our current CDP implementation this is what we use to retrieve the protocol used for a given response. I am checking if I could reuse this for our WebDriver BiDi implementation. The specification for the `protocol` we should expose in our network events is at https://pr-preview.s3.amazonaws.com/w3c/webdriver-bidi/pull/204.html#get-the-protocol , the most important part being:
> If response’s final connection timing info is not null, set protocol to response’s final connection timing info's ALPN negotiated protocol. 

Does this match nsIChannel `protocolVersion`? If yes, do you know when we can start reading this on the channel? If not, do you have any suggestion to get the correct value here? 

Thanks!

Edit: I should have read the idl first :) it looks like this is pretty self explanatory:     
```
/**
     * Returns the network protocol used to fetch the resource as identified
     * by the ALPN Protocol ID.
     *
     * @throws NS_ERROR_NOT_AVAILABLE if called before the response
     *         has been received (before onStartRequest).
     */
    [must_use] readonly attribute ACString protocolVersion;
```

but let me know if you have any concern around this nonetheless.

Back to Bug 1790370 Comment 3