I'm doing some test with Fiddler core and I'm able to intercept the traffic for almost all sites, but for some HTTPS sites I get empty response body.
I have found 2 sites by now:
I have tested other HTTPS sites (including StackOverflow) and I have no problem with them.
This is my code:
var content = oSession.ResponseHeaders.FirstOrDefault(
(item => string.Equals(item.Name, "content-type", StringComparison.InvariantCultureIgnoreCase)));
if (oSession.host.Contains("google.com"))
if (content != null)
{
if (!content.Value.Contains("text/html")) return;
}
else return;
else return;
var x = oSession.oResponse;
var body = oSession.GetResponseBodyAsString(); // actual response from the server
var doc = new HtmlDocument();
doc.LoadHtml(body);
var htmlNode = doc.DocumentNode.ChildNodes["html"];
if (htmlNode == null)
{
return; // no HTML tag -> not an HTML page
}
As you can see I get the content-type
header, then check if the session is from Google and then check if the header value is text/html
, if it is then I put the response body in the body
variable...
At this point I put a break point to verify the body
value but it is empty (""), beside that when I continue the execution the Google home page load anyways, and if I check the session with Fiddler I can see the response body normally.
I have looked in Google and found nothing, also I have checked every response from Google (not only text/HTML) and found nothing that can help.