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

Fiddler and Server-sent Events

3 Answers 1069 Views
Windows
This is a migrated thread and some comments may be shown as answers.
Connor
Top achievements
Rank 1
Connor asked on 13 Nov 2017, 05:45 PM
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>

3 Answers, 1 is accepted

Sort by
0
Simeon
Telerik team
answered on 27 Nov 2017, 03:06 PM
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
0
Vishal
Top achievements
Rank 1
answered on 29 Mar 2018, 02:40 PM

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

0
Simeon
Telerik team
answered on 10 Apr 2018, 01:09 PM
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
Tags
Windows
Asked by
Connor
Top achievements
Rank 1
Answers by
Simeon
Telerik team
Vishal
Top achievements
Rank 1
Share this question
or