i know how to retry a request on normal 500 error or when it give error in OnReturningError chain
but the problem is the error with HTTP/1.1 0 FIDDLER GENERATED - RESPONSE DATA WAS MISSING and response code 0 wont retry what chain exactly handle this error ?
2 Answers, 1 is accepted
0
Nick Iliev
Telerik team
answered on 20 Jul 2022, 11:12 AM
Hi Farshad,
It seems that for some reason, Fiddler received an incomplete response , so what you could do is check if the client application (which requests produce that error) is working properly with HTTP/1.1 proxy or if it needs some additional proxy configuration.
you mean that this error is related to client but not the server (host) but i see the request of the client is ok. the server i testing is under heavy load so it is normal to i get error like this but my problem is that i cannot retry that request . the response is not in the on before response and it is not in the on returning error
Nick Iliev
Telerik team
commented on 21 Jul 2022, 06:27 AM
Actually, it could be a server issue we can't tell by looking at Fiddler. The fact is that the response is not received (for some reason) or is only partially received, leading to the inability to complete the session. Saying that the test server is under heavy load is pinpointing the issue's origin.
ok my question is why i cant retry this request i use the code below in onreturnoferror chain it catch the dns error or other fiddler related error but wont catch this one
if ((oSession.uriContains(".domain.com")))
{
oSession.utilDecodeRequest();
if (!String.IsNullOrEmpty(oSession["X-RetryNumber"])) return;
if (No_Cache)
{
oSession.oRequest.headers.Remove("If-None-Match");
oSession.oRequest.headers.Remove("If-Modified-Since");
oSession.oRequest["Pragma"] = "no-cache";
}
for (var i: int = 0; i < 30; ++i)
{
var oSD = new System.Collections.Specialized.StringDictionary();
oSD.Add("X-RetryNumber", i.ToString());
var newSession = FiddlerApplication.oProxy.SendRequestAndWait(oSession.oRequest.headers, oSession.requestBodyBytes, oSD, null);
newSession["ui-backcolor"]="#7FFFD4";
newSession["ui-comments"]=oSession["ui-comments"]+" "+"Retry"
if ((302 == newSession.responseCode)||(newSession.responseCode == 204)||(200 == newSession.responseCode)||(newSession.responseCode == 304)||(oSession.responseCode == 301))
{
// If we were successful on a retry, bail here!
oSession.oResponse.headers = newSession.oResponse.headers;
oSession.responseBodyBytes = newSession.responseBodyBytes;
oSession.oResponse.headers["Connection"] = "close"; // Workaround limitation
//break;
return;
}
}
}