Skip to content
This repository has been archived by the owner on Aug 13, 2018. It is now read-only.

Implement "modify and resend" #21

Open
fflorent opened this issue Oct 17, 2015 · 5 comments
Open

Implement "modify and resend" #21

fflorent opened this issue Oct 17, 2015 · 5 comments

Comments

@fflorent
Copy link
Member

Like in the Network panel, the "modify and resend" feature would be quite useful in order to interact with the server directly (and to debug it). The feature would be available for the outgoing messages only.

Florent

@eliihen
Copy link
Member

eliihen commented Nov 21, 2015

Hey.

I had a look at this issue, but after creating the gui, I failed to figure out how to hook into an active web socket connection. We have a webSocketSerialID on a frame, but I find no API that lets us connect using this ID. If you have any suggestions on how one could do this, I'm all ears.

@fflorent
Copy link
Member Author

I failed to figure out how to hook into an active web socket connection

Actually, I don't even know if Firefox provides such an API, there might be some requirements to fulfill. @bakulf Is it already possible? Otherwise how hard would it be to implement that?

@esphen Also would you be interested in sharing your work in progress?

Florent

@eliihen
Copy link
Member

eliihen commented Nov 21, 2015

Of course, @fflorent. This is what I got so far: master...esphen:issue21

It looks like this:
screenshot from 2015-11-21 20-14-39

@fflorent
Copy link
Member Author

Thanks @esphen and nice patch!

As this bug sounds to be blocked until we have a clear answer for your question, would you be interested in contributing on other issues? (this one for example)

If so and when you need some assistance, don't hesitate to ping me on IRC if I can help (my nickname is fflorent on #firebug or #devtools ; server: irc.mozilla.org). You can also ping Honza on these channels (he's more active during the work week).

Florent

@bakulf
Copy link

bakulf commented Nov 22, 2015

We don't have such functionality and I don't know if we really want to have it.
'modify and resend' for http request makes totally sense because they are somehow "state-less": a completely new request is sent, disconnected from the website logic. But resending a frame can break the logic of the website because, I guess, we want to use the same WebSocket object, that is alive somewhere and it could be in the middle of some kind of its own logic state...

But if we decide to go for this functionality, we must implement quite few things:
a WebSocket can run in any thread (any worker thread and main-thread) and the sending must happen in the correct thread as well. This means that we must modify the frame, then deliver it to some kind of service that knows where the WebSocket channel lives (on which thread, let's say) and send it via such WebSocket channel.
And of course we want it also for e10s and b2g :)

@janodvarko can you give a feedback about this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants