>> Good plan. Will do it this way. If I use buffer_replace2() on the >> header repeatedly from under http_res_get_intercept_rule() or >> http_req_get_intercept_rule() it does not appear that it would cause >> any problems - It is already being used from under >> http_remove_header2() which is called from under those functions, but >> maybe I missed something. Did I? >> >> And, is buffer_replace2() the best tool for the job, or would you >> suggest a different call? > > Yes I think it's the appropriate one. Look how the Connection header > is processed for example. You might also be interested in looking at > how reqrep/rsprep are processed in apply_*_filter* with action > ACT_REPLACE. I think it's the closest to what you want to do.
Willy: Thanks for the tips. I have made some progress here, and was just about to call exp_replace() when I realized it does not have a way to protect against the destination buffer overrun. Would it be OK if I added the protection? And, a natural question arises as to whether there currently exists a buffer overrun in one or more of the three places where it is currently called. -- Sasha Pachev Fast Running Blog. http://fastrunningblog.com Run. Blog. Improve. Repeat.

