eCap how to get full Raw header.

Asked by Shmulik Kipod

Hi everyone...

Is there a way of getting full raw header of messages inside eCap code without changing squid sources?
I would like to do that because i wish to maintain a clean stable squid versions upon upgrades/maintenance.

Thank you in advanced,

shmulik. k.

Question information

Language:
English Edit question
Status:
Solved
For:
eCAP Edit question
Assignee:
No assignee Edit question
Solved by:
Shmulik Kipod
Solved:
Last query:
Last reply:
Revision history for this message
Alex Rousskov (rousskov) said :
#1

You can get each of the message header fields using the libecap::Header::visitEach() interface. You can get the entire header as text using the libecap::Header::image() interface. These interfaces work both for the request or response message being adapted and, in RESPMOD, for the cause/request message.

Revision history for this message
Shmulik Kipod (sssfw2003) said :
#2

Thank you for the quick response Alex, and i admire your work!!

i have tried with libecap::Header::image() before asking with no success i'm afraid, message got garbled for some reason, i think(90%) i'm doing something wrong with handling the image, can you provide a simple example e.g. print header to stdio..

Thank you again,

Shmulik

Revision history for this message
Shmulik Kipod (sssfw2003) said :
#3

SOLVED!! thanks for the help, Alex again your work is amazing...

I used a proper libecap::Header::image() and got success!!.

Shmulikipod....