Amos Jeffries <squid3 <at> treenet.co.nz> writes: > > On 6/11/2013 12:37 p.m., WorkingMan wrote: > > 1) Is the POST body request preserved when using url_rewrite_program? Based on > > my test it seems to be lost. If it's lost is it easy to modify SQUID to > > preserve that (or maybe an option to enable that)? > > It should be preserved. Only headers portion should be completely > rebuilt with new headers copied from the old URLs' request to the new > URLs' request. > > > 2) Can URL be rewritten in content adaptation like eCAP (or ICAP)? Just > > wondering. > > Yes. > > > 3) what is the order of url_rewrite_program (or other redirect option) and > > content adaptation order (which one comes first?). > > 1) http_access access controls (deny_info redirect) > 2) ICAP/eCAP > 3) URL-rewrite/redirect > 4) adapted_http_access controls (deny_info redirect again) > 5) source selection stages ... > > > Let me know what can be done for rewrite the URL and preserve POST body (so > > query params in the request body and not in the URL) > > "query params" in the POST body, and body. Nothing Squid does affects them. > > Amos > > I went with eCAP to do this but in the request mode I am not able to get the POST body. I can get response from response mode so something is working. I am using the same adapter for request/response but it seems I don't get any events for request mode(tshark shows that on SQUID server side I am receiving correct header and POST body). squid.conf visible_hostname my.example.com cache deny all forwarded_for off strip_query_terms off cache_effective_user proxy cache_effective_group proxy client_dst_passthru off host_verify_strict off http_port 3130 intercept http_port 3128 ecap_enable on loadable_modules /etc/dev/adapter.so ecap_service eReqmod reqmod_precache bypass=0 uri=ecap://my.example.com/injection?mode=REQMOD adaptation_service_set reqFilter eReqmod acl GOOD_HTTP_STATUS http_status 200 adaptation_access eReqmod allow GOOD_HTTP_STATUS http_access allow all http_reply_access allow all access.log: shows up the POST request cache.log: says ACL is used but htere is no HTTP reply -- not matching. that's the only thing I have in it. syslog: shows no log