Websocket messages not all readable

4 posts, 0 answers
  1. Emeric
    Emeric avatar
    3 posts
    Member since:
    Apr 2017

    Posted 04 Apr 2017 Link to this post

    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

     

  2. Emeric
    Emeric avatar
    3 posts
    Member since:
    Apr 2017

    Posted 06 Apr 2017 Link to this post

    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.

  3. Tsviatko Yovtchev
    Admin
    Tsviatko Yovtchev avatar
    549 posts

    Posted 13 Apr 2017 Link to this post

    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
  4. Emeric
    Emeric avatar
    3 posts
    Member since:
    Apr 2017

    Posted 14 Apr 2017 Link to this post

    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
Back to Top