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

unable to change response body

6 Answers 1160 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 13 Oct 2015, 07:13 PM
static function OnBeforeResponse(oSession: Session) {
        if (oSession.uriContains("google.com")) {
            FiddlerApplication.Log.LogString("before "+oSession.GetResponseBodyAsString());
            oSession.utilSetResponseBody("empty");
            FiddlerApplication.Log.LogString("after "+oSession.GetResponseBodyAsString());
        }
    }

 

hi.

i am trying to chage response body from third party website.

in fiddler log i see that response body is changed, but browser receives unchanged response body.

can anybody to help me with my issue?

6 Answers, 1 is accepted

Sort by
0
Eric Lawrence
Telerik team
answered on 13 Oct 2015, 10:13 PM
In 99% of the cases where someone reports this issue it turns out that they've configured the response body to stream to the client as it is read from the server (e.g. by pushing the STREAM button in Fiddler's toolbar). When that happens, the client is fed the blocks of the response as it is downloaded, and the event handler mentioned only executes after the response has already been returned.

If you disable Streaming, it should work as you expect.

Regards,
Eric Lawrence
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
Alex
Top achievements
Rank 1
answered on 13 Oct 2015, 10:47 PM
oh, thanks, that is works
0
Alex
Top achievements
Rank 1
answered on 14 Oct 2015, 12:20 AM

but i have another issue:

i cannot access some sites with fiddler certificate, i got sec_error_unknown_issuer

particularly in mozilla a dont have an option to add security exception.

0
Eric Lawrence
Telerik team
answered on 14 Oct 2015, 03:21 PM
Hi,

For browsers like IE and Chrome to trust Fiddler's root certificate, you must accept the prompt that is shown when you first enable HTTPS decryption inside Fiddler.

For Firefox, which does not respect the Windows Certificate store, you must manually trust Fiddler's root certificate: http://www.telerik.com/blogs/configuring-firefox-for-fiddler

Regards,
Eric Lawrence
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
poorna
Top achievements
Rank 1
answered on 23 May 2018, 10:51 PM

Hi 

I have saved my working response   usingbefore response and the complete response is saved to fiddler captures folder

 

Now  the task is I want to send this captured response back to the client, I have tried this by using utilsendresponse and loadresponsefromfile etc but I am not able to send my captured response to client. I have disabled streaming as well. Kindy help how can I sendthis dummy response to client

0
Kammen
Telerik team
answered on 29 May 2018, 10:44 AM
Hi,

Have you tried to use the AutoResponder feature of Fiddler?

In this blogpost you can find how to use it to change the response to the client. Can you give it a try and see if this is what you're looking for?


Regards,
Kammen
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
Fiddler Classic
Asked by
Alex
Top achievements
Rank 1
Answers by
Eric Lawrence
Telerik team
Alex
Top achievements
Rank 1
poorna
Top achievements
Rank 1
Kammen
Telerik team
Share this question
or