Closed Bug 1566243 Opened 5 years ago Closed 5 years ago

Columns 'OpCode', 'MaskBit' and 'FinBit' are showing wrong values

Categories

(Core :: Networking: WebSockets, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: christoph-wa, Assigned: christoph-wa)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [necko-triaged])

Attachments

(3 files)

  1. Column 'OpCode' shows wrong opcode
  2. Column 'MaskBit' is always true, even if the payload is not masked
  3. Column 'FinBit' is always true. The WS engine automatically combines fragmented frames, so this Column can't be false?

Also the ping request of the server is displayed after the response from the browser

Code I used for testing this: https://gist.github.com/wiomoc/00bfdb866e3f5383bc8d302d24a4d43f

@hengyeow: Can you please test this and see whether it's the platform who's providing the wrong data?
(+ also check the order of WS frames)

Thanks,
Honza

Flags: needinfo?(E0032242)

Hi @Honza

I was able to reproduce the scenario mentioned. The attached image shows a series of console logs of frame details (provided by platform) intercepted by the frameReceived callback function in websocket-actor.js.

Flags: needinfo?(E0032242)

@baku, it looks like the platform is giving us wrong WS frame data.
Can you please have a look?

Thanks,
Honza

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(amarchesini)
Priority: -- → P3

Can you assign this to someone from the DOM team? It's important for devtools, but I'm not able to work on this right now. Thanks.
In case, I can give an overview about how webSocket events for devtools are dispatched.

Flags: needinfo?(amarchesini) → needinfo?(htsai)

Looks like in https://searchfox.org/mozilla-central/source/netwerk/protocol/websocket/WebSocketFrame.cpp#113 the parameters 'opcode' and 'maskBit' are serialized in a different order then deserialized.

Blocks: 1566788

(In reply to Andrea Marchesini [:baku] from comment #4)

Can you assign this to someone from the DOM team? It's important for devtools, but I'm not able to work on this right now. Thanks.
In case, I can give an overview about how webSocket events for devtools are dispatched.

Taking via email discussion.

Component: Netmonitor → Networking: WebSockets
Product: DevTools → Core

Thanks for submitting the patch, Christoph! Assigning the bug to you.

Michal, could you help submit the patch if it's correct? Thanks!

Assignee: nobody → christoph-wa
Flags: needinfo?(htsai) → needinfo?(michal.novotny)

The product::component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit auto_nag documentation.

Priority: P3 → --
Priority: -- → P3
Whiteboard: [necko-triaged]
Pushed by mnovotny@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e358fa3061e5
Fix marshalling of WebSocketFrame r=michal
Flags: needinfo?(michal.novotny)
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: