Is it possible to edit an http response? [closed]

2

Is it possible to edit a http response before it is rendered by the browser? Something with this scheme: Receiving the response - > Response editing - > Streaming the response to the browser.

    
asked by anonymous 24.08.2017 / 19:25

1 answer

1

You can use some methods of the class HttpResponse while still on the server. In general frameworks like pure ASP.NET and ASP.NET MVC give you an instance variable pertaining to the page or controller for this. Ie: you can do something like:

Response.Write("Isto é um teste");

And this text will be included in the response sent to the browser.

When the control exits the server, response handling becomes more complex, for two reasons:

  • The editing of content transmitted over the network has to be done "on the nail", since it was the protocols used in the network (IP / TCP / HTTP / SOAP, for example), the format of the messages is not usually standardized. You will brush strings and this can be a very unpleasant job.

  • Any action in this direction is a man-in-the-middle attack, so be ready to deal with security mechanisms that will hinder you depending on the context. p>

25.08.2017 / 13:32