How to construct adopted content and send it?
What I want to do is to for every request that comes through my proxy to send custom html web page.
So I guess I need to adopt body of the content. This is example how to add a header.
libecap:
Must(adapted != 0);
// delete ContentLength header because we may change the length
// unknown length may have performance implications for the host
adapted-
// add a custom header
static const libecap::Name name("X-Ecap");
const libecap:
adapted-
As I found out adopted message contains: first line, header, body and trailer. hostx->virgin.clone copies only header and not the body (is that so?), so I want to add a custom body to this adopted message (This should do the trick?), and I dont know how to do that.
If I was not clear in what I want, here is example. Someone is using my proxy, and it types in browser www.google.com, I want that my proxy send him a custom html page with some messages, so user will see something like this:
HELO WORLD!!!
OK
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- eCAP Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Dajan Zvekic
- Solved:
- Last query:
- Last reply: