Fiddler and Server-sent Events

4 posts, 0 answers
  1. Connor
    Connor avatar
    1 posts
    Member since:
    Aug 2014

    Posted 13 Nov 2017 Link to this post

    I'm having trouble with Fiddler on pages using server-sent events. The eventsource just stays in a pending status if Fiddler captures the request. I don't need to inspect the events in Fiddler, but I would like to be able to inspect the other requests in Fiddler without breaking the page.
     
    While Fiddler is capturing sessions:
    1. Run a server side event server such as https://github.com/hemanth/sse-now
    2. Open a page that connects to the server (below)

    Result: Events are not received

    Following the same steps while Fiddler is not capturing sessions, everything works as expected. Enabling streaming does not solve the issue.

    Is this a bug in Fiddler or is there some way I configure Fiddler to handle this?

     

    Example testSSE.html

    <!DOCTYPE html>
    <html>
    <head>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width">
      <title>SSE demo</title>
    </head>
    <body>
     
    </body>
    <script>
    var source = new EventSource('http://localhost:8000');
    source.onmessage = function(e) {
      document.body.innerHTML += e.data + '<br>';
    };
    </script>
    </html>
  2. Simeon
    Admin
    Simeon avatar
    116 posts

    Posted 27 Nov 2017 Link to this post

    Hi,

    I followed your steps and the test page was receiving the events.

    Regards,
    Simeon
    Progress Telerik
    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
  3. Vishal
    Vishal avatar
    1 posts
    Member since:
    Oct 2012

    Posted 29 Mar Link to this post

    I have a similar problem as Connor. The response header shows as HTTP/1.1 200 OK.

    Request Count:   1

    Bytes Sent:      485(headers:485; body:0)
    Bytes Received:  12,207(headers:260; body:11,947)

    It shows it received the data back but within the Transformer it says "No Response body."

    GET http://emojitrack-gostreamer.herokuapp.com/subscribe/eps HTTP/1.1
    Host: emojitrack-gostreamer.herokuapp.com
    Connection: keep-alive
    Upgrade-Insecure-Requests: 1
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
    Accept-Encoding: gzip, deflate
    Accept-Language: en-US,en;q=0.9


    HTTP/1.1 200 OK
    Connection: keep-alive
    Access-Control-Allow-Origin: *
    Cache-Control: no-cache
    Content-Type: text/event-stream; charset=utf-8
    Server: emojitrack-gostreamer
    Date: Thu, 29 Mar 2018 14:37:54 GMT
    Transfer-Encoding: chunked
    Via: 1.1 vegur

  4. Simeon
    Admin
    Simeon avatar
    116 posts

    Posted 10 Apr Link to this post

    Hello Vishal,

    Sorry, for the late reply. Fiddler needs to read the whole response before the Transformer is able to apply a different compression. The Server-sent events is a stream technology which means that the server's response never ends.

    However, you could use the COMETPeek command on the Web Session's context menu to take a "snapshot" of the in-progress response, allowing you to inspect the partial response data read from the server.

    Regards,
    Simeon
    Progress Telerik
    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
Back to Top