ecap sample adapter_modifying enable debug cause squid crash

Asked by qianguozheng on 2016-03-29

I want to do http response modifications, so with http encoded response I need to decompress the response, but some error happend, so I need to debug where is wrong. I just open Debug in adapter_modifying but when I restart squid it just failed, the error looks like below.

2016/03/30 11:45:01 kid1| Loading Squid module from '/usr/local/lib/ecap_adapter_modifying.so'
2016/03/30 11:45:01 kid1| FATAL: dying from an unhandled exception: file not found

I search the error like below, find that below question like mine, but its solution not fix my problem.
https://answers.launchpad.net/ecap/+question/273542

Question information

Language:
English Edit question
Status:
Solved
For:
eCAP Edit question
Assignee:
No assignee Edit question
Solved by:
qianguozheng
Solved:
2016-03-30
Last query:
2016-03-30
Last reply:
2016-03-29

By the way, without Debug(), it can work just fine.

Alex Rousskov (rousskov) said : #2

I am guessing that you forgot to include Debug.cc when building your adapter library. If you look at src/Makefile.am in the adapter sample, you may notice that the async adapter (the only sample adapter that uses the Debug class) is built using both adapter_async.cc and Debug.cc.

Thanks Alex, that solved my question, I will add more debug message to see the adapter work flow.