This is a migrated thread and some comments may be shown as answers.

Websocket messages not all readable

3 Answers 215 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
Emeric
Top achievements
Rank 1
Emeric asked on 04 Apr 2017, 02:48 PM

Hi,

Thanks for Fiddler and Fiddlercore. I use Fiddler to inspect websocket messages but not all messages are readable.

some message are readable but some are in this format :    j 0p { <  D  A  ZO vұ ....

What's happening as I'm not a real developer ...

Thanks

 

3 Answers, 1 is accepted

Sort by
0
Emeric
Top achievements
Rank 1
answered on 06 Apr 2017, 10:29 AM

Hi,

I've tested CharlesProxy to see if websocket messages are readable and they are ! So I think there's something wrong in Fiddler websocket part.

Perhaps is there a problem in PayloadAsString method ?

Please note that results are the same in Fiddlercore that is my first need, I donwloaded Fiddler app to Check Fiddlercore reliability.

Thanks.

0
Tsviatko Yovtchev
Telerik team
answered on 13 Apr 2017, 02:22 PM
Hi,

Could you send a SAZ file with the session in question to tsviatko.yovtchev at telerik.com?

Regards,
Tsviatko Yovtchev
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Emeric
Top achievements
Rank 1
answered on 14 Apr 2017, 02:46 PM

I've sent my Question in fiddler google group to, so i'have my answer, thanks you Tsviatko Yovtchev

Response is here : https://groups.google.com/forum/#!topic/httpfiddler/zXiHPOprR5s

My code is here :

Imports Fiddler
Imports Fiddler.Utilities
Imports System.Text.Encoding
 
[... more code]
 
    Public Sub OnWebSocketMessageHandler(Sender As Object, e As WebSocketMessageEventArgs)
        If Not e.oWSM.IsOutbound And e.oWSM.PayloadData.Any Then
  
            Dim FirstByte As New BitArray(New Byte() {e.oWSM.ToByteArray(0)}) 'Get first byte from header
            Dim UseDeflate As Boolean = FirstByte.Get(FirstByte.Length - 2) 'Get 2nd bit value (RSV1)
  
            Dim Response As String = Nothing
  
            If UseDeflate Then
                Response = UTF8.GetString(DeflaterExpand(e.oWSM.PayloadData))
            Else
                Response = e.oWSM.PayloadAsString()
            End If
  
            If Not Response = String.Empty Then
                ReadResponse(Response)
#If DEBUG Then
                Debug.Print(Response)
#End If
            End If
        End If
    End Sub
Tags
Fiddler Classic
Asked by
Emeric
Top achievements
Rank 1
Answers by
Emeric
Top achievements
Rank 1
Tsviatko Yovtchev
Telerik team
Share this question
or