Closed Bug 1606626 Opened 4 years ago Closed 4 years ago

Support for STOMP protocol

Categories

(DevTools :: Netmonitor, enhancement, P3)

enhancement

Tracking

(firefox82 fixed)

RESOLVED FIXED
82 Branch
Tracking Status
firefox82 --- fixed

People

(Reporter: Honza, Assigned: rockingskier)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The WebSocket payload preview (in a side panel) should be able to parse STOMP protocol and offer nicely formatted data to the user.

Read more about STOMP: https://stomp.github.io/

Honza

Anyone interested in fixing this bug can look at bug:
Bug 1566755 - Support for WAMP protocol
... to get some inspiration.

Honza

I've started taking a look at this. It's looking promising so far.

It'll be my first contribution so I'll no doubt have some quesitons and issues.

First up, what is the process for pulling in dependencies? I'd like to use the official stomp-js parser (or rather, one of the transpiled versions). It uses the MIT license so there should be no problems there. So far I've just copied the entire file and left it unchanged (bar auto formatting). I've looked around the codebase and there seem to be other similar cases.

Follwing on from that... is it better to pull in a dependency or to write your own version? A subset of the Frame would be useful. Would you suggest pulling in the whole thing unchanged, pull in just what is needed or write something more streamlined (but maybe less feature full). It has functionality for creating Frames as well as parsing them. For this work we obviously only need to parse them.

Thanks
Ben

Assignee: nobody → rockingskier
Status: NEW → ASSIGNED

I opted to pull in the esm6 Parser and Frame (I inlined Byte into Frame rather than add another file/dependency).

Parsed STOMP message

OK, lots of linting errors, mainly from the copied STOMP code. I'll deal with them all next week.

This is all working and up to date. Ready for review.

However I get The analysis task source-test-doc-upload failed, in Phabricator.

Otherwise it builds and test OK.

Flags: needinfo?(odvarko)

@Ben: this is great addition, thanks for working on this!

Is there any online page I could use to test STOMP protocol?

Honza

Flags: needinfo?(odvarko) → needinfo?(rockingskier)

Thanks @Jan :)

I couldn't find a live example site so I made a very basic little app.

You're welcome to use it :)

Flags: needinfo?(odvarko)
Flags: needinfo?(rockingskier)
Pushed by hmanilla@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/49840267c0dd
Implement STOMP WebSocket message parsing. r=Honza,bomsy
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
Flags: needinfo?(odvarko)

Amazing, thanks for all your help.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: